Jump to content

Parse error: syntax error, unexpected T_STRING in /Applications/MAMP/htdocs/cour


starmsa

Recommended Posts

I am a nube when it comes to PHP and I am getting this error and do not know how to get around it:

 

Parse error: syntax error, unexpected T_STRING in /Applications/MAMP/htdocs/courseChoice.php on line 7.

 

My code is attached. Thanks for any help you can give :D

 

[attachment deleted by admin]

I think you have to use = not => to put it in variable.

$students = array (
256 => array ('name' =>'Jon', 'grade' => 98.5),
2 => array ('name' => 'Vance', 'grade' => 85.1),
9 => array ('name' => 'Stephen', 'grade' => 94.0),
364 => array ('name' => 'Steve', 'grade' => 85.1), 
68 => array ('name' => 'Rob', 'grade' => 74.6)
);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.