note 114405 added to function.filter-input
| From: | StefanWeinzierl | Date: | Sun, 16 Feb 2014 16:31:53 +0000 |
| Subject: | note 114405 added to function.filter-input | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198530@lists.php.net to get a copy of this message | ||
Here is an example how to work with the options-parameter. Notice the 'options' in the
'options'-Parameter!
<?php
$options=array('options'=>array('default'=>5, 'min_range'=>0,
'max_range'=>9));
$priority=filter_input(INPUT_GET, 'priority', FILTER_VALIDATE_INT, $options);
?>
$priority will be 5 if the priority-Parameter isn't set or out the given range.
----
Server IP: 72.52.91.14
Probable Submitter: 72.52.91.14
----
Manual Page -- http://php.net/manual/en/function.filter-input.php
Edit -- https://master.php.net/note/edit/114405
Del: integrated -- https://master.php.net/note/delete/114405/integrated
Del: useless -- https://master.php.net/note/delete/114405/useless
Del: bad code -- https://master.php.net/note/delete/114405/bad+code
Del: spam -- https://master.php.net/note/delete/114405/spam
Del: non-english -- https://master.php.net/note/delete/114405/non-english
Del: in docs -- https://master.php.net/note/delete/114405/in+docs
Del: other reasons-- https://master.php.net/note/delete/114405
Reject -- https://master.php.net/note/reject/114405
Search -- https://master.php.net/manage/user-notes.php