Also, granted it doesn't directly answer your question, but you could just
test to see if the first character is a "$" and just use substr() to chop it
off.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Mark Carruth" <mcarruth@t...>
To: "professional php" <pro_php@p...>
Sent: Monday, February 11, 2002 11:26 AM
Subject: [pro_php] Problem With ereg_replace
> I simply want to turn the string $10 into simply 10. But obviously it
won't
> be 10 each time.
>
> The value of price is in the variable $price, so I use
>
> $price = ereg_replace("\$","",$price);
>
> To get rid of the $ at the front, but it doesn't work.
>
> Any ideas ?
>
> TIA
> Mark Carruth
>
>
>
>