Tuesday, January 7, 2014

How to replace degree(°) with " & deg;" using php


$myvalue=" +1°C to +10°C";
$r=preg_replace("/\xB0/", '°', $myvalue);

$myvalue will contain value that you want to replace.

No comments:

Post a Comment