I wrote the following codes:
<?php
$nama = ('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit')
sort $nama
reset($nama)
$i=1;
do
{
$i++;
echo "The key is " . $i . "and the value is “ .$i <br />";
}
while ($i<=5);
Echo "newline";
?>
this error appears:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\xampp\htdocs\php_exercise\exercise3.php on line 4
Why is it?
Thanks.