3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $placementPerCampaign = array(0=> array('placement_id' => '123', 'placement_name' => '123 N'), 1=> array('placement_id' => '456', 'placement_name' => '456 N')); foreach ($placementPerCampaign as $placement) { $placementList[] = array('id' => $placement['placement_id'], 'name' =>$placement['placement_name']); } print_r($placementList);
based on Q4fZp
Output for 4.3.0 - 7.2.0
Array ( [0] => Array ( [id] => 123 [name] => 123 N ) [1] => Array ( [id] => 456 [name] => 456 N ) )