Re: Dollar signs in values

From: Date: Fri, 07 Mar 2003 05:59:02 +0000
Subject: Re: Dollar signs in values
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138566@lists.php.net to get a copy of this message
At 06:58 07.03.2003, Liam Gibbs said: --------------------[snip]-------------------- >How is it I can properly get PHP to represent dollar signs when putting it >into HTML? > >I know that dollar signs denote the beginning of a variable, like $reference >or $ftpstream or whatever. However, I have a text file that contains (or can >contain) values with $ in them. When I open the file and grab those values, >then stick them onto my HTML page, they get unpredictable results. Is there >a way I can escape them or such? --------------------[snip]-------------------- Escape them with a backslash: $text = "The amount is \$400.-"; -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#138566) next »