3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = array( "2019-03-17" => array("data_values" => 1566), "2019-03-18" => array("data_values" => 1542), "2019-03-19" => array("data_values" => 786), "2019-03-20" => array("data_values" => 756) ); $dates = implode(',', array_keys($output)); $data_values = implode(',', array_column($output, 'data_values')); echo "$dates\n$data_values";

preferences:
25.72 ms | 406 KiB | 5 Q