This is the string, which I am trying to clean up.
' <span>CR - CROPLAND</span> '
This is my calling statement:
trim(strip_tags(clean_string($leftTd->innerhtml())))
This is the function I tried to clean it up with, but it does not work.
function clean_string($string){
for($control = 0; $control < 32; $control++) {
$string = str_replace(chr($control), "", $string) ;
}
return $string ;
}
I also tried :
// $string = ereg_replace("[^A-Za-z0-9\-\./,']", " ",$string) ;
, but it does not work.
Help!
Specifically I am trying to get rid of . what exactly is it. Googling does not help\
Thanks
Before running replacement, decode the HTML entities with html_entity_decode().