Hi Again,
I have a small problem that I can't seem to find any help on with php.net or google...
Using PHP4, I want to combine two (or 3,4) array's into one big multidimensional array. I don't want to do this straight away for several reasons, lets just say I have tried most things (I want to sort the different arrays at differnt points etc)!
So, lets say I have
$visitors = array(33,5,12,1)
$referrers = array("aol.com","msn.com","google.com","yahoo.com")
$percentage = (66,10,14,2) // Not accurate, but you get the point, as a %
And I want these to go into one multidimensional array (after I have sorted them):
$big_array = array($visitors,$referrers)
But this doesn't work, as i want this big array to have a normal key structure (0 to 5 or whatever), and a row by row of visitors, referrers.
I want:
$big_array = array (33,"aol.com","66%"),
array(5,"msn.com","10%")
How can I combine these array's most efficiently? I could go through each array using a foreach(), but is this the best way? Can't I use a array_combine() or something similar for PHP4 (the combine is only for PHP5)?
Thanks for taking the time to read this,
Cheers,
Yari