[PHP] Array decleration problem

2007-01-03 Thread Delta Storm

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Array decleration problem

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-02 10:48:27 +0100:
 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)

that statement is incomplete (; missing).

 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

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php