You are here: Re: show array name « PHP Programming Language « IT news, forums, messages
Re: show array name

Posted by hygum on 11/02/06 09:34

i dont know the name of the array, though i understand why you ask

i want a function, that dumps an array nicely, to write something like
this:

array $myarray

(
0 => duck
1 => eagle
2 => hen
)

for debugging. Then i dont have to insert an echo like the one you
suggest.

Mateusz Markowski wrote:
> hygum napisal(a):
> > is there a function, that can echo/print the name of an array, so when
> > i dump the array, it also says the name? For instance:
> >
> > echo array_name($myarray);
> >
> > outputs:
> > myarray
>
> Could you explain why do you want to do this?
>
> If you have written "$myarray" it means that you know the name of the
> array, so you can just write:
> echo "\$myarray"

 

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

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