I'm tearing my hair out on this one, though I suspect the answer is simple... Help much appreciated.
I am using this function (not mine) to strip one string out of another....
function trim_mid2($str,$from,$to){
while( strpos($str,$from) )
$str=str_replace($from,$to,$str);
return($str);
}
Question: how do I make it strip the *%$! ampersand? (&). It works for (as far as I can see) all other characters - just not that. (I need to strip " out of some text and it just ignores it... )
Also, a minor query - how does one strip a carriage return ? I thought it was c, but that does not work - I have <br>(carriage return)<br> that I need to strip...
Help appreciated as always.
Nick