FILTER_CALLBACK

It can be used to call a user defined function to filter the value .

Example
======

<?php

function removeSpace($var) {
return str_replace(” “, “”, $var);
}

echo filter_var(“PHP Codez”, FILTER_CALLBACK,array(“options”=>”removeSpace”));
?>

Output
=====

PHPCodez

Leave a Reply

Your email address will not be published. Required fields are marked *