ecgbyme Posted January 14, 2012 Posted January 14, 2012 Does anyone know what needs to be corrected in this line of code? The error is: Parse error: syntax error, unexpected '.', expecting '(' in /includes/modules/new_products.php on line 16 Line 16 is: $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); I have tried forward slashes on both sides of /'text/' with no results. Appreciate any help!
ecgbyme Posted January 14, 2012 Author Posted January 14, 2012 Can someone help resolve this Parse Syntax error: Here is the error: Parse error: syntax error, unexpected '.', expecting '(' in /includes/modules/new_products.php on line 16 Here is the code for line 16: $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); I put some forward lines in /'text/' but no change ocurred. Appreciate and help!
♥geoffreywalton Posted January 14, 2012 Posted January 14, 2012 Try posting 5 lines before and 2 after Cheers G Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
ecgbyme Posted January 15, 2012 Author Posted January 15, 2012 Hi Geoffrey: Here is some of the code. It's not a big file. Line 16 is in bold. Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); new contentBoxHeading($info_box_contents); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); }
ecgbyme Posted January 15, 2012 Author Posted January 15, 2012 Solved the problem. Thank you for all the help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.