Help needed: Syntax for array of arrays
Posted: Thu Jan 02, 2003 11:18 pm
I'm basing some PHP on routines provided by another programmer. In the sample, I'm given this example:
I have two sets to define, so I removed the comment // from the end of the first array, deleted the second array and also removed the comment // from the beginning of the third line resulting in code that looks like this:
Now, when I execute the code, I get this error message:
Line 149 happens to be the one defining the 'photos' set. So, is the comma *not* the separator that I want between the two array definitions? Can someone tell me where to look in the PHP documentation to diagnose this error message?
Thanks,
Elsi
Code: Select all
// define all supported sets in your repository
$SETS = array (
array('setSpec'=>'phdthesis', 'setName'=>'PHD Thesis', 'setDescription'=>'') //,
// array('setSpec'=>'math', 'setName'=>'Mathematics') ,
// array('setSpec'=>'phys', 'setName'=>'Physics')
);Code: Select all
$SETS = array (
array('setSpec'=>'photos', 'setName'=>'photos', 'setDescription'=>'Digital photos'),
array('setSpec'=>'genealogy', 'setName'=>'genealogy' 'setDescription'=>'Family Tree')
);Code: Select all
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /u2/elsi/public_html/config.php on line 149Thanks,
Elsi