php joli imprimé
print("<pre>".print_r($array_data,true)."</pre>");
Difficult Dormouse
print("<pre>".print_r($array_data,true)."</pre>");
$json_string = json_encode($data, JSON_PRETTY_PRINT);
header('Content-Type: application/json');
JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
composer require majorgrey/pretty_json
<?php
use MajorGrey\PrettyJson;
$array = array(
"name" => "majorgrey",
'email' => "[email protected]",
'metadata' => array (
'color' => 'blue',
'food' => 'chicken'
)
);
$json = json_encode($array);
$pretty_json = PrettyJson::print($json);
echo $pretty_json;
composer require majorgrey/pretty_json