making var_dump look nice

i was var_dumping an array the other day, and it comes out like a massive string you cant read. a fast way to make this readable is just to add some pre tags to it.




// here is the original dumped array - result 1
$my_array = [ "1" => "one", "2" => "two", "3" => "three" ];
// using var_export
array ( 1 => 'one', 2 => 'two', 3 => 'three', )// using the pre tags
array (
  1 => 'one',
  2 => 'two',
  3 => 'three',
// use hightlight string to make it awesome!

Other Items in php
Page Views

This page has been viewed 237 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
I believe that success can be measured in the number of uncomfortable conversations you're willing to have.