I have an array
array:10 [▼
0 => array:3 [▼
"name" => "Xperia Z Ultra"
"img" => "xperia-z-ultra.jpg"
"img_path" => "/Applications/MAMP/htdocs/code/site/public/images/photos/devices/"
]
1 => array:3 [▶]
2 => array:3 [▶]
3 => array:3 [▶]
4 => array:3 [▶]
5 => array:3 [▶]
6 => array:3 [▶]
7 => array:3 [▶]
8 => array:3 [▶]
9 => array:3 [▶]
]
I want to make it pretty so I did this
$pretty_devices = json_encode($devices, JSON_PRETTY_PRINT);
<div><pre>{{$pretty_devices}}</pre></div>
I got it display in pretty format as I wanted, but it kind mess up my
img_path.
How do I stop that ?
If you only want to see it nicely try print_r() instead.
echo "<div><pre>".print_r($pretty_devices, true)."</pre></div>"