<?php
$sqlprotype1="select path FROM {$tbPre}product_type where pid=2";
$resultprotype1=$db->query($sqlprotype1);
while($rsprotype1=$db->fetchArray($resultprotype1)){
?>
<li><a title="<?php echo $rsprotype1['title'];?>" href="<?php echo str_replace(" ",'-',$rsprotype1['url']);?>-<?php echo $rsprotype1['id'];?>.html"><?php echo $rsprotype1['title'];?></a></li>
<?php }?>
$sqlprotype1="select path FROM {$tbPre}product_type where pid=2";
$resultprotype1=$db->query($sqlprotype1);
while($rsprotype1=$db->fetchArray($resultprotype1)){
?>
<li><a title="<?php echo $rsprotype1['title'];?>" href="<?php echo str_replace(" ",'-',$rsprotype1['url']);?>-<?php echo $rsprotype1['id'];?>.html"><?php echo $rsprotype1['title'];?></a></li>
<?php }?>
打印一下能看到数组吗
$sqlprotype1="select path FROM {$tbPre}product_type where pid=2";
$resultprotype1=$db->query($sqlprotype1);
while($rsprotype1=$db->fetchArray($resultprotype1)){
print_r($rsprotype1);
?>
<li><a title="<?php echo $rsprotype1['title'];?>" href="<?php echo str_replace(" ",'-',$rsprotype1['url']);?>-<?php echo $rsprotype1['id'];?>.html"><?php echo $rsprotype1['title'];?></a></li>
<?php }?>