来源:
else if ($key == 'title'){
if (strlen($value->advObj['title']) > 15)
$advTitle = substr ($value->advObj['title'], 0,15)."...";
else
$advTitle = $value->advObj['title'];
echo '<a href="index.php?p=newApp&id=&obj=cpn'.$value->advObj['id'].'">'.$value->advObj['id'].' - '.$advTitle.'</a>';
}
点击结果:
index.php?p=newApp&id=&obj=cpn1038
我需要它:
index.php?p=newApp&id=1038&obj=cpn
我该怎么做
答案 0 :(得分:1)
从中使用:
else if ($key == 'title')
{
if (strlen($value->advObj['title']) > 15)
$advTitle = substr ($value->advObj['title'], 0,15)."...";
else
$advTitle = $value->advObj['title'];
echo '<a href="index.php?p=newApp&id='.$value->advObj['id'].'&obj=cpn">'.$advTitle.'</a>';
}