By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

My code (from a template) is saying: Parse error: syntax error, unexpected T_STRING,

P: 3
My code (from a template) is saying: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

When i open the .php in dreamweaver, it confirms the error. the code is:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.                               if ($menu->getActive() == $menu->getDefault())  {
  3.                               echo "More Cosmetics Store VirtueMart Templates at <a rel="nofollow" href="http://www.templatemonster.com/category/cosmetics-store-virtuemart-templates/" target="_blank">TemplateMonster.com</a>";
  4.                               }
?>

Any help would be AWESOME!!!!
Jan 6 '13 #1

✓ answered by Anas Mosaad

Replace double quotes with single quotes in the string or escape the double quotes. For example, use:
Expand|Select|Wrap|Line Numbers
  1. echo "More Cosmetics Store VirtueMart Templates at <a rel='nofollow' href='http://www.templatemonster.com/category/cosmetics-store-virtuemart-templates/' target='_blank'>TemplateMonster.com</a>";

Share this Question
Share on Google+
2 Replies


100+
P: 185
Replace double quotes with single quotes in the string or escape the double quotes. For example, use:
Expand|Select|Wrap|Line Numbers
  1. echo "More Cosmetics Store VirtueMart Templates at <a rel='nofollow' href='http://www.templatemonster.com/category/cosmetics-store-virtuemart-templates/' target='_blank'>TemplateMonster.com</a>";
Jan 6 '13 #2

P: 3
Thank you so much!!!!!!!!!!!
Jan 6 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.