Page 1 of 1

T_CONSTANT_ENCAPSED_STRING [Solved]

Posted: Tue Oct 30, 2007 4:17 am
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

Re: T_CONSTANT_ENCAPSED_STRING

Posted: Tue Oct 30, 2007 4:37 am
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" ?

Posted: Tue Oct 30, 2007 4:59 am
by shivam0101
CoderGoblin,

Thanks. I removed the single quote.