我无法附上图片,所以请在链接中找到数组。我消除了这个数组的重复值。我使用了有点糟糕的技术。数组名称是$pap。这是代码
`foreach ($pap as $key => $row)
{
foreach ($row as $subkey => $subvalue)
{ $p[$n]=$pap[$key][$subkey];
$n++;
}
}
$unique = array_unique($p);
$n=0; $abc = array();
foreach ($unique as $key => $row){
$abc[$n]=$unique[$key]; $n++;
}
$m=0;
echo "<table align='center' border='2'>";
foreach ($pap as $key => $row)
{
echo "<tr>";
foreach ($row as $subkey => $subvalue)
{
if($m<$n){
if($pap[$key][$subkey]==$abc[$m])
{
echo "<td>";
echo $pap[$key][$subkey];
echo "</td>";
$m++;
}
}
}
echo "</tr>";
}
echo"</table>";`
任何更好的技术将不胜感激。