I do a print_r($my_var)
and get a result like:
Array ( [0] => Array ( [email] => maa@hotmail.com ) [1] => Array ( [email] => mee@gmail.com ) )
How to get a new array like
$mails= array( 'maa@hotmail.com','mee@gmail.com' );
array_values($myvar[0]);
// Will return the values inside you array ( I noticed your array was nested, so I did the values of he 0 element).
http://www.php.net/manual/en/function.array-values.php
Highly recommend just having a little read of all the available array functions just quickly so you can see what is possible.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.