while($rows_search1 ...) { $row_1[] = ...; } while($rows_search2 ...) { $row_2[] = ...; } $row = array_merge ($row_1,$row_2);