1

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 ?

Community
  • 1
  • 1
Howard
  • 11
  • 1
  • Can you give an example of its use? – Kevin Lacquement Apr 08 '11 at 21:59
  • 3
    possible duplicate of [Reference - What does this symbol mean in PHP?](http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php) and more specifically for example [What does “=>” mean in PHP?](http://stackoverflow.com/questions/1241819/what-does-mean-in-php) – hakre Oct 12 '12 at 17:06

2 Answers2

4

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.

alexn
  • 57,867
  • 14
  • 111
  • 145
0

http://php.net/manual/en/language.operators.php

Justin Stryker
  • 373
  • 4
  • 13