note 119874 added to reserved.variables.get
| From: | PHPNotes | Date: | Sun, 11 Sep 2016 05:37:58 +0000 |
| Subject: | note 119874 added to reserved.variables.get | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206562@lists.php.net to get a copy of this message | ||
I like to use the following as a method to make sure data is not provided as an array before I try
and use it, resulting in "Array" warning.
if(!in_array(false, array_map("is_string", $_POST)))
{
All data has been submitted as string.
}
Naturally, this is only applicable if all data is supposed to be a string, but it's far easier
and cleaner than using is_string on up to 20 elements
----
Server IP: 72.52.91.14
Probable Submitter: 121.220.11.137
----
Manual Page -- http://php.net/manual/en/reserved.variables.get.php
Edit -- https://master.php.net/note/edit/119874
Del: integrated -- https://master.php.net/note/delete/119874/integrated
Del: useless -- https://master.php.net/note/delete/119874/useless
Del: bad code -- https://master.php.net/note/delete/119874/bad+code
Del: spam -- https://master.php.net/note/delete/119874/spam
Del: non-english -- https://master.php.net/note/delete/119874/non-english
Del: in docs -- https://master.php.net/note/delete/119874/in+docs
Del: other reasons-- https://master.php.net/note/delete/119874
Reject -- https://master.php.net/note/reject/119874
Search -- https://master.php.net/manage/user-notes.php