I have an array like this:
$a1 = array(
array('id'=>"1","others"=>"asdhuisah"),
array('id'=>"4","others"=>"asdhuisah"),
array('id'=>"213","others"=>"asdhuisah")
);
and I want to save a part of it into a new array $a2
.
I know I can do it using loops:
$a2 = array();
foreach($a1 as $key=>$value){
array_push($a2,$value["id"]);
}
Is there a function that I can use to do all this at once?