PHP: Multidimensional array problem
Long time beating head against wall. Hope it will feel good soon....
I have the following arrays (I'm a beginner):
//Categories
$cat['venue']=$venue;
$cat['contacts']=$contacts;
$cat['room']=$room;
$cat['ceiling']=$ceiling;
$cat['freight']=$freight;
$cat['equipment']=$equipment;
$cat['lighting']=$lighting;
$cat['electrical']=$electrical;
$cat['AV']=$AV;
//Screens
$ceiling['ceiling-data2.php']=$ceiling2;
$ceiling['ceiling-data3.php']=$ceiling3;
$ceiling['ceiling-data4.php']=$ceiling4;
$ceiling['ceiling-data5.php']=$ceiling5;
$ceiling['ceiling-data6.php']=$ceiling6;
$ceiling['ceiling-data7.php']=$ceiling7;
//Screen fields
$ceiling2[0]='roomID';
$ceiling2[1]='description';
$ceiling2[2]='sofitNotes';
But, when I run the following script (trying to get 'description' as my returned result), I get nothing:
$result = $cat['ceiling']['ceiling-data2.php'][1];
echo $result;
I've tried a host of other ways to write the $result variable -- many of them return parse errors, some return nothing. Can anyone help?
THANKS!!
|