|
Posted by Erwin Moller on 01/17/07 14:35
Hi,
Consider the following code:
-------------------------
function giveArr(){
return array("one","two","three");
}
echo giveArr()[1];
// I am hoping for "two"
-------------------------
This syntax clearly doesn't work.
Does anybody know if that is possible?
If so, what is the right syntax?
(Of course I can store the returned array in some variable, and then use an
indexing on that variable.)
I am curious if the above construct is possible (in another syntax
obviously) with PHP.
TIA
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|