Hi,

I've got the below code that queries the database, grabs all the records and places them into an array. I then use a foreach at certain sections to print out the desired results. However for the foreach I have below it should print out 1 records although it is print 2 records, that are exactly the same. There are also only two records in the database which are totally different. So does anyone have any idea why this is doing this?

PHP Code:
$stuff mysql_query("SELECT * FROM " $pre "templates");
if(!
$stuff) {
errorMsg($l_query);
print 
mysql_error();
} else {
while (
$stuffa mysql_fetch_array($stuff)) {
$ID $stuffa["ID"];
$Name $stuffa["Name"];
$Value $stuffa["Value"];
$Type $stuffa["Type"];

$more = array("ID" => $ID"Name" => $Name"Value" => $Value"Type" => $Type);
}

print 
"<b>Footers</b><br>";
reset ($more);
foreach (
$more as $key => $value) {
$more[$key]["ID"] = $ID;
$more[$key]["Name"] = $Name;
$more[$key]["Value"] = $Value;
$more[$key]["Type"] = $Type;

if(
$Type[$value] == "1") {
echo 
"$Name <a href='$PHP_SELF?fid=$ID&action=editfooter'>Edit</a>";
echo 
" <a href='$PHP_SELF?fid=$ID&action=deletefooter'>Delete</a><br>\n";
}
}

Thanks
-Peter McNulty