You need to have this $EricCodesArray = array ( "CO" => array("Description", "Input Name", "Select Name", "Option Name", "Option Selected"), "AN" => array("ERIC Number", "EricAN", "SelAN", "AN", "AN «Annotation»"), "TI" => array("Title", "EricTI", "SelTI", "BT", "BT «Book Title»") );
you must place the 5 elements in a sub array Jim ----- Original Message ----- From: "John Taylor-Johnston" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 08, 2003 4:47 PM Subject: [PHP] Array - Newbie question > New at this, somewhat: > > <?php > #http://www.php.net/manual/en/ref.array.php > $EricCodesArray = array ( > "CO" => "Description", "Input Name", "Select Name", "Option Name", "Option Selected", > "AN" => "ERIC Number", "EricAN", "SelAN", "AN", "AN «Annotation»", > "TI" => "Title", "EricTI", "SelTI", "BT", "BT «Book Title»" > ); > > echo $EricCodesArray=>TI[2]; //should display "SelTi" > > ?> > > I want to display "SelTi". How to code for it? I know I should know this. > EricCodesArray where TI = [2] > > ? :) > John > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php