...

View Full Version : php array push function?



myriad360
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?

Thanks!

whizard
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

Dan

Zangeel
08-26-2009, 05:57 AM
Can you post the arrays you have.

tailender1
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..
Reference
http://us.php.net/array_merge
http://us2.php.net/array_push



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum