note 119874 deleted from reserved.variables.get by peehaa
| From: | peehaa@php.net | Date: | Sun, 28 Apr 2019 10:58:10 +0000 |
| Subject: | note 119874 deleted from reserved.variables.get by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210843@lists.php.net to get a copy of this message | ||
Note Submitter: PHP Notes
----
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