php - remove an utf-8 text in string with str_replace -


i try remove utf-8 link in stirng

  $old = array("سایت (english) :");          $new   = array('');         $string = str_replace($old, $new, $string); 

but no success ...can please tell me mistake?

note can remove pure non-english or pure english not both in 1 text

try :

 $string =  mb_convert_encoding ($string, 'utf-8');  $old    = array (mb_convert_encoding ("سایت (english) :", 'utf-8'));  $new    = array ('');  $string = str_replace ($old, $new, $string); 

Comments