Possible Duplicate:
What does “=>” mean in PHP? Reference - What does this symbol mean in PHP?
I see this symbol in a lot of PHP code.
I can't figure out what it means or what it does..
Is it really an operator ?
Do you mean =>
? If so, it's for initializing array keys (or indexes if you prefer). Like this:
$values = array(
'foo' => 'bar'
);
This will initiazlie an array with a key named foo with a value of bar.
Read more on about arrays at php.net.
http://php.net/manual/en/language.operators.php
精彩评论