note 24667 rejected from function.current by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Sun, 25 Aug 2002 04:56:55 +0000 |
| Subject: | note 24667 rejected from function.current by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35573@lists.php.net to get a copy of this message | ||
multidimensional array access
=============================
$test = array( colors => array("blue", "green"),
numbers => array("one", "two")
);
not working:
=============
echo current($test)[0];
working
=======
1: echo current(current($test));
2: echo $test[colors][0];
3: echo current($test["numbers"]);
4: $cur = current($test);
echo $cur[0];
I tried the staff with those braces
current($test){[0]};
{current($test)[0]};
{current($test)}[0];
{current($test)}[0];
but this seems not to work...