It is a simple newsreader.
In the attachment there are a few screenshots.
I have some trouble with converting the data in the database to JSON-array. Sometimes there are special characters, which will fail the conversion. I already made an custom function to strip these characters, but sometimes still some text will not be converted.
CodeDownload
function convert_smart_quotes($string)
{
$search = array(chr(145),
chr(146),
chr(147),
chr(148),
chr(151),
chr(225));
$replace = array("'",
"'",
'"',
'"',
'-',
'a');
return strip_tags(str_replace($search, $replace, $string));
and the calling part:
CodeDownload
$mdata['news_news'] = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$mdata['news_news'] = convert_smart_quotes($mdata['news_news']);
Has someone experience how to handle this?