Complete PHP Filter Reference
The FILTER_CALLBACK filter calls a user defined function to filter the value.
This filter gives us full control over the data filtering
The specified functions must be in an associative array with the name "options". See example below
Tip: You can create your own user defined function or use an existing PHP function
Using a user defined function:
The output of the code will be:
Using an existing PHP function
The output of the code will be:
Complete PHP Filter Reference
Your message has been sent to W3Schools.