|
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();
[Back to original message]
|