Menu Home

PHP filter functions

man in grey sweater holding yellow sticky note

Filtering in PHP is super easy with the built in filter_var() function. Filtering is essential when taking in form input or applying logic to any set of data. This is especially crucial when sanitizing user input in order to prevent XSS and Sql injection attacks. filter_var ( mixed$variable [, int $filter = FILTER_DEFAULT [, mixed$options ]] ) : mixed Grab […]