T_CONSTANT_ENCAPSED_STRING [Solved]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

T_CONSTANT_ENCAPSED_STRING [Solved]

Post by shivam0101 »

I am getting T_CONSTANT_ENCAPSED_STRING error

Code: Select all

$confirm_link="<a href='".SITE_URL."/confirm.php?cc=$confirm_code'>".LOTTERY_URL.'/confirm.php?cc=$confirm_code'"</a>";
SITE_URL is constant defined in config.php
Last edited by shivam0101 on Tue Oct 30, 2007 5:00 am, edited 2 times in total.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Re: T_CONSTANT_ENCAPSED_STRING

Post by CoderGoblin »

Code: Select all

$confirm_link="<a href=\"".SITE_URL."/confirm.php?cc=$confirm_code\">".LOTTERY_URL."'/confirm.php?cc=$confirm_code'</a>";
extra double quote in front of </a> and missing one after LOTTERY_URL. Also do you really want the single quotes in the link "text" ?
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

Post by shivam0101 »

CoderGoblin,

Thanks. I removed the single quote.
Post Reply