I am parsing a string like any other string, or apparently it is
I am still getting �
instead of some white spaces
the parser is working with all other strings but this
the original string is :
CONTENT content CONTENT content CONTENT content CONTENT
I am getting :
CONTENT content�CONTENT content�CONTENT content�
I did filter the output from /r/n /n
and HTML characters , and as I mentioned , it works with every other string and html characters
do you have any reasons for that ? I tried to encode the output , but nothing changed , but when I decode it , it disappears along with all the string
code :
$posts_info[$counter][2] = preg_replace("/&#?[a-z0-9]{2,8};/i","",$posts_info[$counter][2]);
$posts_info[$counter][2] = str_replace(array("\r\n", "\r"), "\n", $posts_info[$counter][2]);
$n_lines = explode("\n", $posts_info[$counter][2]);
$new_lines = array();
foreach ($n_lines as $i => $line) {
if(!empty($line))
$new_lines[] = trim($line);
}
$posts_info[$counter][2] = implode($new_lines);