My php code is being displayed in the browser but only after the first echo is called leaving this output in the browser
“;
while($row=mysql_fetch_array($results,MYSQL_ASSOC)){
echo ” “.$row[‘title’]; } echo “”; ?>
<?php
require('settings.php');
?>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<?php
$mysql=mysql_connect(mysql_host, mysql_username, mysql_password, true);
mysql_select_db(mysql_database, $mysql);
$mostrecent=mysql_query("SELECT * FROM table ORDER BY date DESC", $mysql);
$top20=mysql_query("SELECT * FROM table", $mysql);
mysql_close($mysql);
echo "<div id=\"mostrecent\">";
while($row=mysql_fetch_array($results,MYSQL_ASSOC)){
echo "<br />".$row['title'];
}
echo "</div>";
?>
</body>
</html>
That is my code and those are constants defined in settings.php using define().
ENCODING ERROR, WAS UTF-16 on a server that didn’t support UTF-16, re encoded into UTF-8 works perfectly