note 81680 deleted from function.is-array by tularis

From: Date: Sun, 09 Oct 2011 09:29:09 +0000
Subject: note 81680 deleted from function.is-array by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183745@lists.php.net to get a copy of this message
Note Submitter: Amaroq ---- Even if an array has only one value, it is still an array and is treated like one. <?php $arr[] = "I'm an array."; if(is_array($arr)) { foreach($arr as $val) { echo $val; } } ?> The above code outputs: I'm an array.

« previous php.notes (#183745) next »