Firefox mini-loop Error
-
Hi, I’m using the mini-loop code in other page to show the lastest 5 posts in my blog. IE are executing the code perfectly, but Firefox doesn’t. The title of the posts are showed, but the links to the respectives posts are changing “/” to “\” and the browser can’t show the page.
My code is this:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<title>blog</title>
</head>
<body>
<table width="170" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="170" height="133" align="left" valign="top"><?php
$how_many=5; //How many posts do you want to show
require_once("wp-config.php"); // Change this for your path to wp-config.php
file ?>
<?
$news=$wpdb->get_results("SELECTID
,post_title
FROM $wpdb->posts
WHEREpost_status
= \"publish\" ORDER BY ‘ID’ DESC LIMIT ".$how_many);
foreach($news as $np){
printf ("» %s<br
/>
", $np->ID,$np->post_title);
}?></td>
</tr>
</table>
</body>
</html>
- The topic ‘Firefox mini-loop Error’ is closed to new replies.