Posted by Captain Nemo on 08/20/07 13:52
I've been writing code lately that loops through the $_POST and
$_SESSION arrays and needs to determine if a particular member is a
scalar or an array.
I've found a test that works:
while (list($key, $value) = each($_POST))
{
if ((string) $value == "Array")
etc.
but it really looks a bit tacky to me.
Can anyone suggest something a bit more respectable?
Thanks.
Navigation:
[Reply to this message]
|