Showing posts with label using php. Show all posts
Showing posts with label using php. Show all posts

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.