RE: [PHP] Trying to create a comment function

2009-08-07 Thread Ford, Mike
> -Original Message- > From: Allen McCabe [mailto:allenmcc...@gmail.com] > Sent: 06 August 2009 20:20 [] > It was working wonderfully, until I wanted to display "test of > $newComment" > as a comment. > > [code] > > comment("test of $newComment"); > > [/code] > > This rendered a

Re: [PHP] Trying to create a comment function (RESOLVED)

2009-08-06 Thread Allen McCabe
Asher and Jonathan, Thank you for your input. Having single quotes around what I wanted to comment worked to display a variable name. And Asher, I am constantly scanning the php.net manual, and only after I could not find what I was looking for did I resort to php-general list. I am a novice at p

Re: [PHP] Trying to create a comment function

2009-08-06 Thread Jonathan Tapicer
> > [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 quot

RE: [PHP] Trying to create a comment function

2009-08-06 Thread Asher Snyder
Allen, Local variables are indeed cleared at the end of a function, see http://www.php.net/manual/en/language.variables.scope.php for more information. Furthermore, there are numerous ways to use variables within a string, the simplest method is the one that you described by enclosing your varia