while ($row = mysql_fetch_array($rec)) {

$data[$row['name']][] = $row['box'];
}
foreach($data as $type=>$size)
{
print $type;

foreach($size as $bon)
{
echo '  <a href="test.php?id='.$row['id'].'">'.$bon."</a>";

}

print "<br />\n";
}
tet.phpのidの数字が表示されません。どこがおかしいのですか?