How to remove
(that are hidden) and SPACES in below text but
<br>
tagi tested:
trim($string)
=> NOT WORKEDstr_replace(' ', '', $string)
=> NOT WORKEDi used some regex => NOT WORKED
<br>تاريخ ورود: یکشنبه ۲۳ بهمن ماه ۱۳۹۰
UPDATE:
Thanks
This solution will work, I tested it:
$string = htmlentities($content, null, 'utf-8');
$content = str_replace(" ", "", $string);
$content = html_entity_decode($content);