RE: [PHP] Dollar signs in values
| From: | Martin Towell | Date: | Fri, 07 Mar 2003 06:01:54 +0000 |
| Subject: | RE: [PHP] Dollar signs in values | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138569@lists.php.net to get a copy of this message | ||
code snippets would be helpful....
-----Original Message-----
From: Liam Gibbs [mailto:liamgibbs@sympatico.ca]
Sent: Friday, March 07, 2003 5:07 PM
To: php list
Subject: Re: [PHP] Dollar signs in values
> Escape them with a backslash:
>
> $text = "The amount is \$400.-";
All that does is print \$ in my HTML.
What's going on is that it will put, say, RR$T into a file when that's typed
into a textbox or any typable form control. That's properly saved in the
file.
So the file will contain RR$T.
When it's output, it could be RR, or RR$T, depending on some unpredictable
factors (haven't figured it out).
By adding a slash, what gets saved in the file is RR\$T, but what gets
output could be RR\ or RR\$T, depending on those same factors.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php