note 91137 added to language.operators.increment

From: Date: Wed, 27 May 2009 06:35:20 +0000
Subject: note 91137 added to language.operators.increment
Groups: php.notes 
Request: Send a blank email to php-notes+get-156048@lists.php.net to get a copy of this message
michal dot kocarek no doubt meant for $array_count and $max_count in his example to have the same variable name. I would also add that you can store the array size in the initialization step of the loop, which saves you a line: <?php for($i=0, $n=count($array); $i < $n; ++$i) { // Do something } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 75.82.195.12 ---- Manual Page -- http://www.php.net/manual/en/language.operators.increment.php Edit -- https://master.php.net/note/edit/91137 Del: integrated -- https://master.php.net/note/delete/91137/integrated Del: useless -- https://master.php.net/note/delete/91137/useless Del: bad code -- https://master.php.net/note/delete/91137/bad+code Del: spam -- https://master.php.net/note/delete/91137/spam Del: non-english -- https://master.php.net/note/delete/91137/non-english Del: in docs -- https://master.php.net/note/delete/91137/in+docs Del: other reasons-- https://master.php.net/note/delete/91137 Reject -- https://master.php.net/note/reject/91137 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#156048) next »