how can i get a value $price and remove the dollars sign to make $price2. I need two values of the price, one with the dollar sign at the beginning, and the other just as a number. How can i strip off the $ sign? thanx
// To strip off the $ sign $price1 = "$2.00"; $price2 = substr($price1,1); echo $price1." - ".$price2."<br />"; // Or to add the $ sign $price1 = "2.00"; $price2 = "$".$price1; echo $price1." - ".$price2;