I’m trying to get the database to return all the records and format them into table cells, this only outputs the first one.
How do I format this so that it puts all sets into table before stopping the loop please.
This is the code I currently have:
[php]<?
include(“dbconnect.php”);
$getnews = mysql_query(“select * from news ORDER BY id DESC”);
while($r=mysql_fetch_array($getnews)){
extract($r);
/* echo("$title on $date
$sector
$location
$salary
$details
"); */
}
?>
<?php print $title;?> | <?php print $sector;?> | <?php print $location;?> | <?php print $salary?> |
Description | <?php print $details;?> |
THanks for your time.
SDM
[b]Admin Edit: Changed (bold) tags to [php] Tags for readability. Please see http://phphelp.com/guidelines.php for posting guidelines