I have an array object that looks like:
$inDatabase = Array
(
[0] => stdClass Object
(
[abc@gmail.com] => Array
(
)
)
[1] => stdClass Object
(
[xyz@gmail.com] => Array
(
)
)
)
How do I push email addresses onto a new array? I tried the following:
$innerKeys =[];
$temp=[];
for($i=0;$i<2;$i++){
$temp = array_keys($inDatabase[$i])
//so I thought $temp[0] would have the email address but $temp is null.
array_push($innerKeys,$temp[0]);
}