Today’s lesson brought to you by echo '<pre>' . print_r($commits_response['0'], true) . '</pre>';
never once thought to wrap the output in pre tags before seeing it today.
Me neither! Came up yesterday in a MOOC I am studying. It’s the little things …
I usually drop a little function into my projects
function pa($a) { echo '<pre>'.print_r($a,true).'</pre>'; }
for exactly that purpose. Then you can usepa()
in place ofprint_r()
.