I am trying to find every occurrence of a pattern within a string, and remove it. For example:
$string = "abcdabcdabcd";
and I want to remove every a so that $string = "bcdbcdbcd"
is there a function that does that? Or a simple way. I know I can use index() and loop through and do substr() etc...but is there a more eloquent solution?
$string = "abcdabcdabcd";
and I want to remove every a so that $string = "bcdbcdbcd"
is there a function that does that? Or a simple way. I know I can use index() and loop through and do substr() etc...but is there a more eloquent solution?