I'm trying to display all the rows in a table called news.
I know there is data in there as well.
When I test it only shows the most recent entry.
Am I missing something?
Code: Select all
$sql = "SELECT * FROM news";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($newArray = mysql_fetch_array($result)){
$headline = $newArray ['headline'];
$content = $newArray ['content'];
$time = $newArray ['date_added'];
}
echo "$headline,$content,$time <br \>";