You are here: Re: Feature request for print_r() and var_dump() « PHP « IT news, forums, messages
Re: Feature request for print_r() and var_dump()

Posted by Torsten Roehr on 01/15/05 12:37

"Daevid Vincent" <daevid@daevid.com> wrote in message
news:200501150011.j0F0BeIg005914@daevid.com...
> I suggest a slight but useful change to these two functions, or possibly
an
> alternate parameter.
>
> I find myself always having to do this annoyance:
>
> echo "<B>myDevice</B><BR>";
> print_r($myDevice);
>
> To get:
>
> myDevice
> Array
> (
> [3333] => Array
> (
> [range] => range_3
> [scanner] => scanner_3
> [record] => record_3
> )
>
> [4444] => Array
> (
> [range] => range_4
> [scanner] => scanner_4
> [record] => record_4
> )
> )
>
> It seems to me the functions should just print out the name of the array
> you're looking at, at the very top, just as it prints out the keys. I
> already know it's an "Array" or I wouldn't be print_r()'ing it.

print_r() can also be used to output the contents of an object. So it's not
always an array! To output the type of the variable *does* make sense.

Best regards, Torsten Roehr

 

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

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