halo everyone. now I'm trying to merge array inside array after query from SQL.. and the result like this
array(3) {
[0]=>
array(1) {
["building_id"]=>
string(1) "1"
}
[1]=>
array(1) {
["building_id"]=>
string(1) "2"
}
[2]=>
array(1) {
["building_id"]=>
string(1) "3"
}
}
I already tried to use this code
$result=[];
foreach($bulding_ids as $arr)
{
$result = array_merge($arr['building_id'],$result);
}
but maybe that is not a answer
I want to that array become like this
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
Can I make like that?