query("select * from blog order by id desc limit $limit,10"); while($row=$query->fetch_assoc()){ $id=$row['id']; $blog_img=$row['blog_img']; $blog_title=stripslashes($row['blog_title']); $blog_titles=preg_replace("/\s+/", "-", stripslashes($row['blog_title'])); $blog_tag=$row['blog_tag']; $blog_post=substr(strip_tags(html_entity_decode($row['blog_post'])), 0, 200); $username=json_decode(get_user_details($conn,$row['user'],'data')); $time_reg=new DateTime($row['time_reg']); $time_reg=$time_reg->format('d, M Y'); $counted=count_views($conn,$id); echo <<<_end