VasillyGifts Posted November 7, 2009 Posted November 7, 2009 Hi I've added some extra text for the products short description add-on and I'm now getting this error. I cannot see where the extra '<' is and whether I should be adding a '>' or removing the '<' I know it's in the following area. I'd appreciate any help. $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>'; } break; Thanks!
♥FWR Media Posted November 7, 2009 Posted November 7, 2009 Hi I've added some extra text for the products short description add-on and I'm now getting this error. I cannot see where the extra '<' is and whether I should be adding a '>' or removing the '<' I know it's in the following area. I'd appreciate any help. $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>'; } break; Thanks! $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>'; } break; Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
VasillyGifts Posted November 7, 2009 Author Posted November 7, 2009 $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b><br>' . $listing['short_desc'] . '</b>'; } break; Thanks for that. However, I'm now getting the following error Parse error: syntax error, unexpected T_STRING based on the same text. Any help will be greatly appreciated. Thanks
♥FWR Media Posted November 7, 2009 Posted November 7, 2009 Thanks for that. However, I'm now getting the following error Parse error: syntax error, unexpected T_STRING based on the same text. Any help will be greatly appreciated. Thanks No there's nothing wrong with the code I posted, must be something else. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
MrPhil Posted November 8, 2009 Posted November 8, 2009 It's not a PHP error, but you do have your HTML tag nesting screwed up. You have <a href="a URL"><b>link text</a></b><br>short desc</b> I suspect you want something like <a href="a URL"><b>link text</b></a><br>short desc<br> You're also missing a closing ' at the end of the first line (fixed here): if (...) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</b></a><br>' . $listing['short_desc'] . '<br>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><b>' . $listing['products_name'] . '</b></a><br>' . $listing['short_desc'] . '<br>'; }
VasillyGifts Posted November 8, 2009 Author Posted November 8, 2009 It was the closing ' that I had missed out. I have just noticed that FWR had corrected this in their first reply. Sorry for the confusion. Thanks to both of you for your help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.