PHP code example of onx / sanitize

1. Go to this page and download the library: Download onx/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/ */

    

onx / sanitize example snippets

bash
use Onx\Sanitize\Sanitize;

$text = '  <p>Hello, <strong>world</strong>!</p>  ';
$sanitizedText = Sanitize::text($text);

echo $sanitizedText; // Output: Hello, world!
bash
$text = '  <p>Hello, <strong>world</strong>!</p>  ';
$sanitizedText = sanitize($text);

echo $sanitizedText; // Output: Hello, world!