Re: Why is some_function()[some_index] invalid syntax?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 10, 2008, at 8:00 PM, Arlen Christian Mart Cuss <celtic@xxxxxxxxxx > wrote:

Hi there,

Why is it that if I try to evaluate an index of an array returned by a
function immediately, a syntax error is produced? (unexpected '[',
expecting ',' or ';')

Thanks,
Arlen.

I've run into this problem. (It works in Javascript >.>)

While I don't know why, you could store it in a temporary variable or use the list() language construct.

-Casey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux