note 113452 added to function.return
| From: | magnesium dot oxide dot play+php at gmail dot com | Date: | Sat, 12 Oct 2013 02:47:33 +0000 |
| Subject: | note 113452 added to function.return | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196534@lists.php.net to get a copy of this message | ||
You can return an array without assigning it to a variable in advance.
<?php
function array_return(){
//doing some stuff
return array('foo'=>1, 'bar'=>5);
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 183.177.153.216
----
Manual Page -- http://php.net/manual/en/function.return.php
Edit -- https://master.php.net/note/edit/113452
Del: integrated -- https://master.php.net/note/delete/113452/integrated
Del: useless -- https://master.php.net/note/delete/113452/useless
Del: bad code -- https://master.php.net/note/delete/113452/bad+code
Del: spam -- https://master.php.net/note/delete/113452/spam
Del: non-english -- https://master.php.net/note/delete/113452/non-english
Del: in docs -- https://master.php.net/note/delete/113452/in+docs
Del: other reasons-- https://master.php.net/note/delete/113452
Reject -- https://master.php.net/note/reject/113452
Search -- https://master.php.net/manage/user-notes.php