<?php
$cizu1 = $navinfor[cizu];
$fzuci = explode(',', $cizu1);
$ffzuci = count($fzuci);
$zc = '';
$count = 0;
for ($i = 0; $i < $ffzuci; $i++) {
$rr = $empire->fetch1("SELECT id, classid, duyin, title, titleurl FROM {$dbtbpre}ecms_zidian WHERE title='$fzuci[$i]' and duyin !='' LIMIT 10");
if ($rr['id']) {
$zc .= '<a href="'.$rr['titleurl'].'">'.$rr['title'].'</a>';
$count++;
}
if ($count >= 6) {
break;
}
}
echo $zc;
?>
用逗号分割cizu字段,并且将分割开的每一个值都与{$dbtbpre}ecms_zidian中的title值匹配