-5

below are my string, get from mail server using imap.

"i have string get from mail

Hello Everyone
I am comment from RTE 
let me know about extra characters 

Thank You"

1 Answers1

0

check this code. i think it will help you

<?php 
 $string = "let me know about extra characters&nbsp;";
 $string = str_replace('&nbsp;', '', $string);
 echo $string;
 echo "<br>";
 // check 2
 $string = "let me know about extra characters&nbsp;";
 $string = preg_replace("/\s|&nbsp;/",' ',$string);
 echo $string;
Shafiqul Islam
  • 5,570
  • 2
  • 34
  • 43