Please note that I have already read Reference — What does this symbol mean in PHP? and What Does This Mean in PHP -> or => and I know that what =>
do in PHP.
My question is different.
Generally most programming languages use =
to assign value to another.
Example 01
$my_name = "I am the Most Stupid Person"; //Yes, that is my name in SO :-)
Example 02
$cars = array();
$cars[0] = "Volvo";
$cars[1] = "BMW";
$cars[2] = "Toyota";
Now let see following example.
$myArray = array(
0 => 'Big',
1 => 'Small',
2 => 'Up',
3 => 'Down'
);
Here is also what happen is we have assigned 'Big' for $myArray['0']
.
But here we used =>
instead of =
. Is there any special reason that PHP was designed that way?