mannyee Posted March 20, 2010 Share Posted March 20, 2010 hi guys! after successfully running the following query $sql = "SELECT cat_id, cat_parent_id, cat_name, cat_description, cat_image FROM tbl_category"; i performed the following: $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result) { $categories[] = array('cat_id' => $row['cat_id'], 'cat_parent_id' => $row['cat_parent_id'], 'cat_name' => $row['cat_name'], 'cat_description' => $row['cat_description'], 'cat_image' => $row['cat_image']); } $content = 'categories.html.php' but while running the page an error shows up as follows: Parse error: parse error in C:\wamp\www\project8\admin\category\index.php on line 19 here line 19 means the start of the while loop.... while ($row = mysql_fetch_assoc($result) i tried all my best and seems to me all is well.....but what's the actual problem here? Link to comment https://forums.phpfreaks.com/topic/195949-parse-error/ Share on other sites More sharing options...
Alex Posted March 20, 2010 Share Posted March 20, 2010 You're missing a closing ) on this line: while ($row = mysql_fetch_assoc($result) Should be: while ($row = mysql_fetch_assoc($result)) Link to comment https://forums.phpfreaks.com/topic/195949-parse-error/#findComment-1029276 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.