Re: Trying to create a comment function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> [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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux