Re: Trying to create a comment function

From: Date: Thu, 06 Aug 2009 20:01:57 +0000
Subject: Re: Trying to create a comment function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-296402@lists.php.net to get a copy of this message
> > [code] > > comment("test of $newComment"); > > [/code] > > This rendered a comment that said "test of ". > > So I added a \ before the $ to make it display properly, but I was wondering > if there was a way that the function could work so that it will display > anything you type within the quotes in comment(" "). > If you want the string to be rendered as it is without variable replacements you can use single quotes, like this: comment('test of $newComment'); That will render exactly this: test of $newComment Hope that helps you. Jonathan

« previous php.general (#296402) next »