PHP code example of erlandmuchasaj / sanitize

1. Go to this page and download the library: Download erlandmuchasaj/sanitize library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

erlandmuchasaj / sanitize example snippets


use ErlandMuchasaj\Sanitize\Sanitize;

$dirtyString = 'Hello - World';

$sanitizedString = Sanitize::sanitize($dirtyString);

// do something with the sanitized text
// you can: $words = explode(' ', $sanitizedString);
// and search the DB per each word.