You are here: Re: problems with list.. « PHP Programming Language « IT news, forums, messages
Re: problems with list..

Posted by Sjoerd on 07/25/07 12:00

On Jul 25, 1:57 pm, Sergei Riaguzov <he...@world.com> wrote:
> I have a function returning smth like list($a,$b):
>
> var_dump says:
>
> list(string $a, string $b) blabla()

This doesn't make sense. I cannot imagine that var_dump() outputs
this.

> How can use this strings now? I try:
>
> list($a, $b) = blabla();
> print($a);

This is the right way. You probably have blabla() returning the right
things if this don't work. You probably have to use array() in
blabla().

function blabla() {
// note: use array() to construct an array, not list()
return array("some", "thing");
}

list($one, $two) = blabla();

 

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

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