note 99462 added to function.filter-var-array
| From: | xavier at osu1 dot php dot net | Date: | Wed, 18 Aug 2010 20:37:08 +0000 |
| Subject: | note 99462 added to function.filter-var-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171822@lists.php.net to get a copy of this message | ||
When I run the script on my linux box (php 5.2.10) the output of "Example #1 A
filter_var_array() example"
is actually:
array(6) {
["product_id"]=>
string(17) "libgd%3Cscript%3E"
["component"]=>
array(1) {
[0]=>
int(10)
}
["versions"]=>
string(6) "2.0.33"
["doesnotexist"]=>
NULL
["testscalar"]=>
bool(false)
["testarray"]=>
array(1) {
[0]=>
int(2)
}
}
Notice that the values of "product_id" and "versions" are not arrays. If you
add the FILTER_FORCE_ARRAY flag to the "product_id" and "versions" filter arrays
then the output returns as it is outlined in the example.
----
Server IP: 64.71.164.2
Probable Submitter: 65.91.98.102
----
Manual Page -- http://www.php.net/manual/en/function.filter-var-array.php
Edit -- https://master.php.net/note/edit/99462
Del: integrated -- https://master.php.net/note/delete/99462/integrated
Del: useless -- https://master.php.net/note/delete/99462/useless
Del: bad code -- https://master.php.net/note/delete/99462/bad+code
Del: spam -- https://master.php.net/note/delete/99462/spam
Del: non-english -- https://master.php.net/note/delete/99462/non-english
Del: in docs -- https://master.php.net/note/delete/99462/in+docs
Del: other reasons-- https://master.php.net/note/delete/99462
Reject -- https://master.php.net/note/reject/99462
Search -- https://master.php.net/manage/user-notes.php