Hey everyone,
I have a function that has an error reading
"Parse error: syntax error, unexpected '}' in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\test5\func\blog.php on line 31"
here is the code for that function:
function get_categories($id = null){
$categories = array();
$query = mysql_query("SELECT `id`, `name` FROM `categories`");
while( $row = mysql_fetch_assoc($query)) {
$categories = $row
}
return $categories;
}
why is there a syntax error saying that there is an unexpected "}" when it seems as though it looks just fine?..