|
Posted by Christoph Burschka on 04/21/07 17:32
Art wrote:
> Can anyone help? I've got a text input box where the user occasionally
> enters $ sign. For example they might enter $90,000 for a dollar amount.
> The problem i'm having is that my php script is seeing this as a variable.
> I'm not sure how to get around this problem.
>
> Art
>
>
Use single quotes instead of double quotes to wrap the string. Inside single
quotes, dollar signs are not parsed as variables.
Example:
$hello = "HELLO";
print "The variable is named $hello";
> The variable is named HELLO
print 'The variable is named $hello';
> The variable is named $hello
--
Christoph Burschka <christoph.burschka@rwth-aachen.de>
Math.-Techn. Assistent i.A.
-------------------------------------------------
RWTH Aachen
Rechen- und Kommunikationszentrum
Dienstgebäude Seffenter Weg 23
52074 Aachen
[Back to original message]
|