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 le
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
>
>
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,
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 ,
nor is it capable of det
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
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 immediate
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, et
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 li
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
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 prob
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
no
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
12 matches
Mail list logo