Other filters

List of miscellaneous filters
ID Name Options Flags Description
FILTER_CALLBACK "callback" callable function or method   Call user-defined function to filter data.

add a note add a note

User Contributed Notes 1 note

thatindividual dot zhang at gmail dot com
10 months ago
Here is an example, since I cannot find one through out php.net"


* Strip whitespace (or other non-printable characters) from the beginning and end of a string
* @param string $value
function trimString($value)

$loginname = filter_input(INPUT_POST, 'loginname', FILTER_CALLBACK, array('options' => 'trimString'));
To Top