I want to make single array from array of array. i have tried by following code but there is not output display that i want.
following is my array.
Array
(
[0] => Array
(
[0] => stdClass Object
(
[id] => 78
[user_id] => 11
[product_id] => 98
[qty] => 3
[size] => 10
)
)
[1] => Array
(
[0] => stdClass Object
(
[id] => 79
[user_id] => 11
[product_id] => 99
[qty] => 3
[size] => 10
)
)
)
And I want following type
Array
(
[0] => stdClass Object
(
[id] => 78
[user_id] => 11
[product_id] => 98
[qty] => 3
[size] => 10
)
[1] => stdClass Object
(
[id] => 79
[user_id] => 11
[product_id] => 99
[qty] => 3
[size] => 10
)
)
My code is following but it's not work
$getResult = $wpdb->get_results("SELECT * FROM mytable");
foreach ($getResult as $key => $value) {
$value->id;
}
Anyone know how to do this ? Please help me how to do this