> -----Original Message----- > From: Hank TT [mailto:[EMAIL PROTECTED] > Sent: 03 August 2003 06:03 > > Well, I might have been more specific about their example, since not > everyone has the book. An excerpt below (so I don't need to > retype all the > names of characters and foul creatures from the Lord of the Rings): > > --------------------------- > $arr1 = array('G', 'R', 'Sr'); > $arr2 = array('N', 'Su', 'O'); > > $arr3 = array_push($arr1, $arr2); > > print $arr3[3][1]; > //prints Su > --------------------------- > > Weird usage....
Well, it wouldn't be weird if it were correct, but it's not, it's wrong! Having executed this, the result should be: $arr3 == 4 $arr1 == array('G', 'R', 'Sr', array('N', 'Su', 'O')) so $arr3[3][1] doesn't even exist, since $arr3 is a simple scalar integer -- but on the other hand, $arr1[3][1] is indeed 'Su'. So it appears there's a typo -- theirs or yours? Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php