I think you could use str_replace where you just replace with an empty string,
i.e.
$stringindatabase = str_replace($stringtoremove, "", $stringindatabase);
I have not tested myself which normally means that there is a bug in the above expression (just looking at my earlier trackrecord)