note 74496 added to function.list
| From: | el dot dodgero at gmail dot com | Date: | Fri, 13 Apr 2007 23:38:20 +0000 |
| Subject: | note 74496 added to function.list | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125371@lists.php.net to get a copy of this message | ||
To Keith Tyler:
Sorry to have to disagree, but you're mixing your languages in your example there... you said:
"In Perl, you can put an array at the end of the list, and it will pick up all remaining
elements from the right hand of the assignment.
($val1,$val2,@others)=array("a","b","c","d","e")
will result in $val1="a", $val2="b", and
@others=("c","d","e")."
Again, all apologies, but what you wanted to say in your perl example was:
($val1, $val2, @others) = ('a', 'b', 'c', 'd',
'e');
Perl has no array() keyword at all, it has an at-sign instead.
----
Server IP: 64.71.164.2
Probable Submitter: 207.126.230.225
----
Manual Page -- http://www.php.net/manual/en/function.list.php
Edit -- https://master.php.net/note/edit/74496
Del: integrated -- https://master.php.net/note/delete/74496/integrated
Del: useless -- https://master.php.net/note/delete/74496/useless
Del: bad code -- https://master.php.net/note/delete/74496/bad+code
Del: spam -- https://master.php.net/note/delete/74496/spam
Del: non-english -- https://master.php.net/note/delete/74496/non-english
Del: in docs -- https://master.php.net/note/delete/74496/in+docs
Del: other reasons-- https://master.php.net/note/delete/74496
Reject -- https://master.php.net/note/reject/74496
Search -- https://master.php.net/manage/user-notes.php