On Thu, January 10, 2008 10:00 pm, Arlen Christian Mart Cuss wrote:
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 PHP is not C.
It's language-design was chosen to not let
2008. 01. 10, csütörtök keltezéssel 21.25-kor Jim Lucas ezt írta:
Nathan Nobbe wrote:
On Jan 10, 2008 11:00 PM, Arlen Christian Mart Cuss [EMAIL PROTECTED]
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
On Jan 11, 2008 3:45 AM, Zoltán Németh [EMAIL PROTECTED] wrote:
and call it Java ;)
or perhaps javascript :)
function cool() {
return [1, 2, 3];
}
alert(cool()[0]);
-nathan
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
Nathan Nobbe wrote:
On Jan 11, 2008 3:45 AM, Zoltán Németh [EMAIL PROTECTED] wrote:
and call it Java ;)
or perhaps javascript :)
function cool() {
return [1, 2, 3];
}
alert(cool()[0]);
-nathan
or Ruby
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
On Friday 11 January 2008, Zoltán Németh wrote:
So, make all your functions return objects, and have the object have a
method called get or index or something like that that returns the index
requested. :)
Better yet, make everything an object: String, Numeric, Array, etc
and call
Arlen Christian Mart Cuss 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 asked that question years ago. It was explained to me that php does
On Jan 10, 2008, at 8:00 PM, Arlen Christian Mart Cuss [EMAIL PROTECTED]
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
On Jan 10, 2008 11:00 PM, Arlen Christian Mart Cuss [EMAIL PROTECTED]
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 ';')
thats hillarious, i literally brought this
Nathan Nobbe wrote:
On Jan 10, 2008 11:00 PM, Arlen Christian Mart Cuss [EMAIL PROTECTED]
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 ';')
thats hillarious, i
On Jan 11, 2008 12:25 AM, Jim Lucas [EMAIL PROTECTED] wrote:
So, make all your functions return objects, and have the object have a
method called get or index or something like that that returns the index
requested. :)
Better yet, make everything an object: String, Numeric, Array, etc
i
11 matches
Mail list logo