Re: array problem??

From: Date: Sun, 29 Jul 2001 18:41:32 +0000
Subject: Re: array problem??
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-8554@lists.php.net to get a copy of this message
At 11:32 AM 7/29/01 -0700, Rasmus Lerdorf wrote:
<?php $a = array("a","b","c"); for ($c=0 ; $c < count($a) ; ++$c);{
Get rid of the ; there             ^^^
Also, echo("$a[$c] <BR>\n"); will probably not work. Try: echo $a[$c]."<br>\n"; or, using your syntax, echo($a[$c]."<br>\n"); You may want to do $c++ rather than ++$c, if only to get into the habit of thinking along the proper lines of pre- and post- incrementing. -Mike

« previous php.windows (#8554) next »