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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -