----- Original Message ----- Sent: November 25, 2003 4:18 PM Subject: [wdvltalk] PHP coding
> If I code the following: > define('TEXT_INFORMATION', 'It is cold.'); > echo TEXT_INFORMATION; > > It works fine as it displaces the "It is cold." at the right place. But, if > I change it to: > define('TEXT_INFORMATION', 'It's cold.'); > echo TEXT_INFORMATION; > It gives a parse error on the first line. I know that the " ' " inside the > two 's caused the error, but then I couldn't figure out how to include any > " ' " in the text content when it is needed (e.g., Summer's heat). PHP is much like JavaScript when it comes to reserved characters, in that you need to "escape" them with a backslash. This should work for you: define('TEXT_INFORMATION', 'It\'s cold.'); echo TEXT_INFORMATION; Regards, Mark Groen MG Web Services Web Site Hosting and Development www.markgroen.com [EMAIL PROTECTED] 604-780-6917 Bowen Island, Canada ____ • The WDVL Discussion List from WDVL.COM • ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]