$page_id=60; $dbhost = 'localhost'; $dbuser = 'alraed_user1'; $dbpass = 'passnopass'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die("cant connect to db"); mysql_select_db("alraed_db",$conn); $sql = "SELECT * FROM fed_news ORDER BY 7 DESC"; mysql_query("SET NAMES 'utf8'"); mysql_query('SET CHARACTER SET utf8'); $result = mysql_query($sql, $conn) or die("cant apply query"); ?>
//$whatIWant = substr($body_unformatted, strpos($body_unformatted, "<") + 1); //echo $whatIWant; //echo strpos($body_unformatted, ">"); //echo substr($whatIWant,strpos($body_unformatted, "<")+1,200); //echo $y; //echo substr($body_unformatted,0,500); echo mb_substr($body_unformatted, 0, 320, 'utf-8')." ..."; ?>