how to remove text in a php variable code example Example: replace all occurrence char in string php $string = str_replace('search','replace',$string);