note 78741 added to function.count
| From: | Jaik at osu1 dot php dot net | Date: | Thu, 25 Oct 2007 13:51:22 +0000 |
| Subject: | note 78741 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131728@lists.php.net to get a copy of this message | ||
The last comment is somewhat inefficient as it runs the count() function at the start of every loop.
The preferred way to iterate through an array would be to use the 'foreach' control
structure.
----
Server IP: 87.124.64.96
Probable Submitter: 62.3.99.77
----
Manual Page -- http://www.php.net/manual/en/function.count.php
Edit -- https://master.php.net/note/edit/78741
Del: integrated -- https://master.php.net/note/delete/78741/integrated
Del: useless -- https://master.php.net/note/delete/78741/useless
Del: bad code -- https://master.php.net/note/delete/78741/bad+code
Del: spam -- https://master.php.net/note/delete/78741/spam
Del: non-english -- https://master.php.net/note/delete/78741/non-english
Del: in docs -- https://master.php.net/note/delete/78741/in+docs
Del: other reasons-- https://master.php.net/note/delete/78741
Reject -- https://master.php.net/note/reject/78741
Search -- https://master.php.net/manage/user-notes.php