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

From: Date: Fri, 11 Jan 2008 18:20:14 +0000
Subject: Re: Why is some_function()[some_index] invalid syntax?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-267092@lists.php.net to get a copy of this message
Arlen Christian Mart Cuss schreef:
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 ';')
because it's not valid syntax. strangely enough php is neither <insert other language here>, nor is it capable of determine valid syntax based on a mind meld with the developer that wrote the code in question. but you knew that already really.
Thanks, Arlen.


« previous php.general (#267092) next »