How to combine multiple arrays in to single array ?
Here's my code:
while($row = db_fetch_array($query)) {
print_r($row);
//foreach($row as $value) {
// $to_gid = $value['to_gid'];
// //unset($value['to_gid']);
// $new_gid[$to_gid][] = $value;
//}
}
EDITED:
print_r prints the below output:
Array
(
[to_gid] => 6012
)
Array
(
[to_gid] => 8227
)
Array
(
[to_gid] => 8227, 6012
)
But my expected o/p is :
Array
(
[to_gid] => 8227, 6012
)
commented foreach is the thing what i have tried :-(
What should i need to do to achieve this?
thanks in advance...