note 110589 deleted from function.sizeof by aharvey

From: Date: Mon, 12 Nov 2012 01:35:43 +0000
Subject: note 110589 deleted from function.sizeof by aharvey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191882@lists.php.net to get a copy of this message
Note Submitter: codeartha at gmail dot com ---- instead of using: for ($i=0; $i<sizeof($array); $i++) { ... } you can, like mensionned before, use: $max = sizeof($array); for ($i=0; $i<$max; $i++) { ... } but I would assume you can cantract this like that: for ($i=0, $max = sizeof($array); $i<$max; $i++) { ... } not that it changes a lot but that might be usefull for some people :)

« previous php.notes (#191882) next »