Re: Array decleration problem

From: Date: Wed, 03 Jan 2007 13:19:31 +0000
Subject: Re: Array decleration problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-246453@lists.php.net to get a copy of this message
it happens because you forgot the semi-collon at the end of the previews line. "Delta Storm" <delta.storm@hi.t-com.hr> escreveu na mensagem news:22.77.04701.07A2A954@pb1.pair.com... > Hi, > > I'm new to php and im learning, I haven't encounter any problems till now > so please help me? :) > > the code: (learning arrays...) > > <?php > > $flavors=array ("banana", "cucumber", "grape", > "vanilla") > > > $flavors2 [0] =3; > $flavors2 [1]=13; > > $fruits ["red"] = "system"; > $fruits ["yellow"] = "server"; > $fruits ["purple"] = "client"; > > echo $flavors; > echo "<br />"; > echo $flavors2; > echo "<br />"; > echo $fruits; > > ?> > > I get an error message: > Parse error: parse error, unexpected T_VARIABLE in C:\Program > Files\XAMPP\xampp\htdocs\test_folder\exercise12.php on line 16 > > I embedded the code into an html document so line 16 is line 6 > ($flavors2[0]=3;) > > I have no idea why is this error showing up i tried everything > > Thank you in advance

« previous php.general (#246453) next »