note 91137 deleted from language.operators.increment by danbrown
| From: | danbrown@php.net | Date: | Wed, 27 May 2009 13:58:05 +0000 |
| Subject: | note 91137 deleted from language.operators.increment by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156074@lists.php.net to get a copy of this message | ||
Note Submitter: wbeaumo1 AT gmail DOT com
----
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
}
?>