You are here: Re: Dumping an array to a web page « PHP Programming Language « IT news, forums, messages
Re: Dumping an array to a web page

Posted by Rik on 01/31/07 00:48

bob.chatman@gmail.com <bob.chatman@gmail.com> wrote:

> On Jan 30, 12:28 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
>> CptDondo <y...@NsOeSiPnAeMr.com> wrote:
>> > Is there some quick way to dump an array to a webpage and have it show
>> > up neatly formatted rather than the typical blob-o-text?
>>
>> > Thanks,
>>
>> > --Yan
>>
>> echo '<pre>';
>> var_dump($var);
>> echo '</pre>';
>>
>> --
>> Rik Wasmus
>
> there is also print_r() which is much nicer for arrays imo
>
> print "<pre>";
> print_r($arr);
> print "</pre>";

Well, in my code it sometimes matters wether I have an integer '1' or a
string '1', hence the var_dump.If you don't need it the layout of print_r
is indeed somewhat 'nicer'.
--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация