Possible Duplicate:
How can you combine two arrays?
I have variable $data1 that contains data from database. And also variable $data2 that contains data in the same structure. How to add two arrays? I want to have 13 rows of data (10 from first array and 3 from second array):
$data1=mysql_query(" SELECT info1,info2,s3 FROM my_table order by info1 desc LIMIT 1, 10 ");
$data2=mysql_query(" SELECT info1,info2,s3 FROM my_table order by RAND() LIMIT 0, 3 ");
//how add data1 and data2? $data1=$data1+$data2 ?
while ($row = mysql_fetch_array($data1)) { ... }
array_merge($array1, $array2, ...)to merge two or more array it will return an array read this