how to convert array in php -




this question has answer here:

hi got array database.

 array (size=4)       0 =>          array (size=1)           0 =>              array (size=1)               'email_1' => string 'denise@aaa.com' (length=18)       1 =>          array (size=1)           0 =>              array (size=1)               'email_1' => string 'denise@aaa.com' (length=18) 

and need this

array (size=4)   0 =>      array (size=1)         email_1' => string 'denise@aaa.com' (length=18)   1 =>      array (size=1)         'email_1' => string 'denise@aaa.com' (length=18) 

i tried array_merge , all. no idea how archive this?

do below:-

$final_array = array();  foreach($original_array $key=>$val){  $final_array[$key][] = $val[0]['email_1']; } print_r($final_array); 

output:-https://eval.in/848213





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -