I keep getting this error when using preg_replace that's mixed with some html.
Warning: preg_replace(): Unknown modifier 'd'
here is the code I used.
it's removing that bit of html from the beginning of a string that contains html.
$foo = preg_replace("/^<div id='IDHERE'>sometext.</div>/", '', $foo);