I want to use a regexp in my str_replace, i suppose the correct solution to this would be to use preg_replace but i don't know how to use that.
Anyway i want to turn src= into the character a if it matches src= or if it has any spaces in between src and =.
Normally to just turn src= it'd be:
$string = str_replace('src=', 'a', $string);
But the problem is that wouldn't work when there are space(s) between src and =. This is why i need to use a regexp. Thanks for any help.
regexp in php str_replacewill take you right there.