3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $end = array( "id" => "value_id_1", "title"=> "value_title_1", "content"=>"value_content_1" ); $iterator = 0; while ( $iterator < 2) { $api_arr["data"][] = array( "id" => $end["id"][$iterator], "title" => $end["title"][$iterator], "content" => $end["content"][$iterator] ); $iterator ++; } print_r($api_arr);
based on 1dpjp
Output for 5.3.20 - 7.2.0
Array ( [data] => Array ( [0] => Array ( [id] => v [title] => v [content] => v ) [1] => Array ( [id] => a [title] => a [content] => a ) ) )