Richard Luckhurst wrote:

> e.g $amount = $524.00 however only 4.00 is displayed in the %Amount
> field on the html page. I tried dropping the .00 from $amount to see
> if this might be a length issue and then %Amount was just 4
> Am I doing something obviously wrong here? I have checked the php
> manual and I appear to be using preg_replace correctly.

>From the manual: 

"replacement  may contain references of the form \\n or (since PHP
4.0.4) $n, with the latter form being the preferred one"

If you use $amount ='\$524.00' instead of '$524.00', it'll work. 


/Per Jessen, Zürich


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

Reply via email to