Hi,
I have created a while loop using Dreamweaver CS3
$colname_rsNumbers = "-1";
if (isset($_GET['id'])) {
$colname_rsNumbers = $_GET['id'];
}
mysql_select_db($database_connGrowl, $connGrowl);
$query_rsNumbers = sprintf("SELECT * FROM growl_numbers WHERE LocoID = %s", GetSQLValueString($colname_rsNumbers, "text"));
$rsNumbers = mysql_query($query_rsNumbers, $connGrowl) or die(mysql_error());
$row_rsNumbers = mysql_fetch_assoc($rsNumbers);
$totalRows_rsNumbers = mysql_num_rows($rsNumbers);
and the page code is
<?php do { ?>
<?php echo $row_rsNumbers['LocoNo']; ?>
<?php } while ($row_rsNumbers = mysql_fetch_assoc($rsNumbers)); ?>
The ID variable is passed from the previous page which gives a result like
Loco1 Loco2 Loco3 Loco4
I want to print the results across the page with a separator between the numbers (e.g. / ) and a full stop after the last one.
Loco1 / Loco2 / Loco3 / Loco4.
The answer is probably quite simple, I have been altering the code to try and achieve the result I want for a number of weeks, so any advice would be much appreciated.
Thanks
Phil