The above example will actually output "NULL" because of the undefined variable doesnotexist - see http://bugs.php.net/bug.php?id=42608.
![]() |
|
||||||||||
|
filter_input_array(no version information, might be only in CVS) filter_input_array -- Gets multiple variables from outside PHP and optionally filters themОписаниеmixed filter_input_array ( int type [, mixed definition] )This function is useful for retrieving many values without repetitively calling filter_input(). Список параметров
Возвращаемые значенияAn array containing the values of the requested variables on success, or FALSE on failure. An array value will be FALSE if the filter fails, or NULL if the variable is not set. Or if the flag FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is not set and NULL if the filter fails. Примеры
filter_input_array
phpnotes dot 20 dot zsh at spamgourmet dot com
10-Sep-2007 10:32
The above example will actually output "NULL" because of the undefined variable doesnotexist - see http://bugs.php.net/bug.php?id=42608.
Sinured
22-Aug-2007 10:10
extract() is a very convenient way of copying all those variables to the local scope. (see http://www.php.net/extract)
iam4webwork at NOSPAM dot hotmail dot com
08-Jun-2007 01:02
The above example raises other questions such as how one would validate an html array. In the input form each input tag that refers to an html array would be named for example testarray[]. However, after the form is submitted, the syntax for validating the values is different from the expected $_POST['testarray[]']. Instead one has to drop the braces and validate as follows, assuming that testarray[] is supposed to be an html array of numerical values:
Darren Craine
01-May-2007 10:04
Your example code does not work. According to this page |