note 41010 modified in function.var-dump by vincent

From: Date: Fri, 26 Mar 2004 14:17:45 +0000
Subject: note 41010 modified in function.var-dump by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67201@lists.php.net to get a copy of this message
As you know this function nicley indents array dumps, but browsers ignore this, so you have to view the source... so to see the nice formatting without looking at the source use an echo before and after, as follows: <?php $thearray = Array("this" => "that", "do", Array("one","two","t")) echo "<PRE>\n"; var_dump($thearray); echo "</PRE>"; ?> Makes my debugging a lot easier :) --was-- As you know this function nicley indents array dumps, but browsers ignore this, so you have to view the source... so to see the nice formatting without looking at the source use an echo before and after, as follows: <?php $thearray = Array("this" => "that", "do", Array("one","two","t")) echo "<PRE>\\n"; var_dump($thearray); echo "</PRE>"; ?> Makes my debugging a lot easier :) http://www.php.net/manual/en/function.var-dump.php

« previous php.notes (#67201) next »