note 2630 deleted from function.sizeof by philip

From: Date: Sat, 24 Nov 2001 19:52:10 +0000
Subject: note 2630 deleted from function.sizeof by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21245@lists.php.net to get a copy of this message
Note that sizeof($x), where $x is a variable that is set but is not an array sizeof, returns 1. Hence you have to be careful e.g. when you are dealing with arrays of multiple dimensions. for ($i = 0; $i < sizeof($myarray[$j]); $i++) will not work as expected if $myarray[$j] hasn't been assigned a value (i.e. an array value).

« previous php.notes (#21245) next »