Re: while question
| From: | Micah Gersten | Date: | Tue, 18 Nov 2008 00:58:07 +0000 |
| Subject: | Re: while question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283425@lists.php.net to get a copy of this message | ||
Jay Blanchard wrote:
> [snip]
> ...foreach...
> [/snip]
>
> You could also use a for loop if you wanted to count;
>
> for($i = 0; $i < count($array); $i++){
> echo $i . "\n";
> }
>
>
>
This is not good because you are calling count every loop iteration.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com