Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-30 Thread Walt Haas
Richard K Miller wrote: If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly PHP 5.2 does seem to support t

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread Richard K Miller
If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; echo current(abc()); Maybe it will be faster if

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread Eric Faerber
Richard K Miller wrote: If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; echo current(abc());

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread Richard K Miller
If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; echo current(abc()); Maybe it will be faste

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread Isaac
On Thu, Jan 29, 2009 at 2:55 PM, Richard K Miller wrote: > If abc() returns an array, is there any possible notation that lets me >>> access a single element? >>> echo abc()[0]; // I wish this were possible >>> ...instead of having to use an intermediate variable? >>> $temp = abc(); // $te

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread thebigdog
Richard K Miller wrote: If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; echo current(abc

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread Richard K Miller
If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; echo current(abc()); Thanks, Ray. What

Re: [UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread thebigdog
Richard K Miller wrote: If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; echo curre

[UPHPU] Accessing an element in an array returned from a function

2009-01-29 Thread Richard K Miller
If abc() returns an array, is there any possible notation that lets me access a single element? echo abc()[0]; // I wish this were possible ...instead of having to use an intermediate variable? $temp = abc(); // $temp is ugly echo $temp[0]; Richard