note 26901 deleted from language.operators by sniper
| From: | sniper@php.net | Date: | Mon, 13 Oct 2003 00:04:06 +0000 |
| Subject: | note 26901 deleted from language.operators by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58361@lists.php.net to get a copy of this message | ||
Note Submitter: rick@brainscraps.com
----
To add to Yasuo's detailed information above, I have seen no mention of '=>',
which is used for:
1. Associative array creation (http://www.php.net/manual/en/function.array.php),
$myarray = array("name"=>"Rick", "age"=>"No answer");
2. Associating keys and values in foreach()
(http://www.php.net/manual/en/control-structures.foreach.php)
foreach($myarray as $key=>$value){
echo "my $key is $value \n";
}
I don't know... I guess this could properly be called an array dereferencer (?), but
wouldn't it make sense to include this among the assignment operators?