Jump to content

parse error


mannyee

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.