I am creating an array from a db SELECT, and want the [key] to reflect the id in the table.
I am getting this error, so I must be doing something wrong.
My code looks like:Code:Parse error: parse error, unexpected T_DOUBLE_ARROW in /file.php on line 18
At the moment, I can produce the array, but with its own keys.PHP Code:$mmenu=array();
while($row=mysql_fetch_array($records))
{
$id = $row["id"];
$value = $row["menuname"];
array_push($mmenu, $id=> $value);
}
return $mmenu;
Thanks
Rich





Bookmarks