Hello Again,
Here is some code that should help. What I am trying to do exactly is only place that <hr> tag between records, and not after the last record. Thus I am trying to detect when the while loop is at the end of the array.
Thank you for your help, i really do appreciate it.
Marc
<?php
require_once ('connect.inc.php');
$query = "SELECT * FROM carts";
$result = @($query);
while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
echo($row['id']) . "<br>\n";
echo($row['name']) . "<br>\n";
//if ( !($row['id'] == end($row)) ) {
//if(in_array($row['id'], $row)) {
//if($row['id'] == end($row)) {
echo("<hr />\n");
//}
}
mysql_free_result($result);
mysql_close();
?>