3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $id_carrier_list = array(); $carriers = array( array( 'id_carrier' => 'test1' ), array( 'id_carrier' => 'test2' ), array( 'id_carrier' => 'test3' ), array( 'id_carrier' => 'test4' ), array( 'id_carrier' => 'test5' ), ); foreach($carriers as $carrier) $id_carrier_list[] .= $carrier['id_carrier']; var_dump($id_carrier_list);
Output for 4.3.0 - 7.1.0
array(5) { [0]=> string(5) "test1" [1]=> string(5) "test2" [2]=> string(5) "test3" [3]=> string(5) "test4" [4]=> string(5) "test5" }