View Full Version : php array push function?
08-26-2009, 01:18 AM
I have two arrays of arrays of arrays. Is there an easy way get one array that is a combonation of the two?
08-26-2009, 02:06 AM
Take a look at all these array functions. I'm not sure what you're doing, but these should take care of it: http://us.php.net/manual/en/book.array.php
08-26-2009, 05:57 AM
Can you post the arrays you have.
08-26-2009, 06:23 AM
you have to use
$result = array_merge($array1,$array2)
dont use array_push. It will just insert the whole array2 as an element or array1. which is not the required result..
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.