Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Having a code parse error would like some help


Adam M

Recommended Posts

I get this error on the index page of my site:

 

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/laptop/public_html/index.php on line 132

 

I have narrowed it down to this string

// This line has been edited to allow a max 5 display categories per of row
    $width = (int)(100 / 5) . '%';
    echo '                <td align="center" class="categories" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('image_' . $rows . '','','images/over_' . $categories['categories_image'] . '',1)">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], '', '', 'name="image_' . $rows . '"') . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";

 

If i take this code out the site works but without the categories, then when i put it back in the site comes up with the error above.

Link to comment
Share on other sites

Try this

 

 

 

// This line has been edited to allow a max 5 display categories per of row                                                                                                                                                                                                                                                                                                                                                                                                                  
   $width = (int)(100 / 5) . '%';                                                                                                                                                                                                                                                                                                                                                                                                                                                           
   echo '                <td align="center" class="categories" valign="top"><a href="' . 
   tep_href_link(FILENAME_DEFAULT, $cPath_new) . 
   '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage("image_' . 
   $rows . 
   '","","images/over_' . 
   $categories['categories_image'] . '",1)">' . 
   tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], '', '', 'name="image_' . $rows . '"') . 
   '<br>' . 
   $categories['categories_name'] . 
   '</a></td>' . 
   "\n";

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...