note 91680 rejected from function.filter-var by danbrown
| From: | danbrown@php.net | Date: | Tue, 23 Jun 2009 02:25:35 +0000 |
| Subject: | note 91680 rejected from function.filter-var by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157256@lists.php.net to get a copy of this message | ||
Note Submitter: tedivm at tedivm dot com
----
The lack of documentation on the third argument caused me a good half hour of grief today, so
here's the structure for anyone else who doesn't want their life wasted by crappy
documentation:
$options = array();
$options['options']['min_range'] = 1;
$options['options']['max_range'] = 10;
$options['flags'] = FILTER_FLAG_ALLOW_OCTAL;
filter_var(3, FILTER_VALIDATE_INT, $options);