Reply to Re: $ sign input

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация