Just wondering if anyone has transformed a 2 dim array to a one dim array in php. I\'ve yet to come across a clear explanation in php. Any suggestion would be appreciated.>
This might be helpful to you if you fetching values from Query here you can use array function which will support in PHP 5.5+
$myfield_arr = array_column($query_result, 'myfield_name');
Say Good bye to loop! Enjoy Smart Code.