note 39458 added to ref.array
| From: | volf44 at mail dot ru | Date: | Thu, 29 Jan 2004 11:34:21 +0000 |
| Subject: | note 39458 added to ref.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64364@lists.php.net to get a copy of this message | ||
How about this:
<?php
// to do: get first element of an array returned by function
$first = array( 0, 1, 2 )[ 0 ]; // syntax error here
// work around
$first = array( 0, 1, 2 );
$first = $first[ 0 ];
?>
----
Manual Page -- http://www.php.net/manual/en/ref.array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39458
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39458&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39458&report=yes
Search -- http://master.php.net/manage/user-notes.php