Re: Trying to create a comment function (RESOLVED)
| From: | Allen McCabe | Date: | Thu, 06 Aug 2009 21:15:56 +0000 |
| Subject: | Re: Trying to create a comment function (RESOLVED) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-296405@lists.php.net to get a copy of this message | ||
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 php, and I don't quite have the familiarity with terms and such
to always find what I'm looking for, or the experience to always know I have
indeed found what I was looking for. I am learning php vis php.net, a PHP
and MySQL for Dummies book, and you fine people on the php-general list.
Additionally, I need things spelled out for me for them to stick, and I
don't have the luxury of asking someone for help who can show in person like
some have had the fortune to have handy when they were learning. I imagine
that there are many who learned as I am, however, seeing as how scripting
and coding is by definition a pioneering endeavour.
Thank you all for the tons of help you have provided, and please bear with
me as I learn. My goal by asking questions of you all is not to get out of
doing any work or research, it's to get myself over the little hangups so I
can proceed with the learning process.
Stay tuned for more 'newbie' questions!
On Thu, Aug 6, 2009 at 1:01 PM, Jonathan Tapicer <tapicer@gmail.com> wrote:
> >
> > [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
>