Re: Pushing array onto array
| From: | Hank TT | Date: | Sun, 03 Aug 2003 05:02:33 +0000 |
| Subject: | Re: Pushing array onto array | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158065@lists.php.net to get a copy of this message | ||
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....
----- Original Message -----
From: "Andrew Brampton" <andrew@bramp.freeserve.co.uk>
To: "Hank TT" <news2002nov@lomaji.com>; <php-general@lists.php.net>
Sent: Saturday, August 02, 2003 2:09 PM
Subject: Re: [PHP] Pushing array onto array
> Well I just coded up a very small example, and it pushing 1 array into the
> other...
>
> Check out: http://81.102.229.151/push.php and
> http://81.102.229.151/push.phps
>
> It works exactly how it should... However really the array isn't a 2
> dimensional one, since PHP doesn't have them, its rather a array of arrays
> which is roughly the same thing (and something not to worry about)...
>
> If you need more help just email me
> Andrew