我有这个代码
$sql3 = mysql_query (" ") ;
while($row3 =mysql_fetch_array($sql3)) {
$sql4 = mysql_query (" SELECT $ww as yourplace FROM data WHERE $ww =
".$row3[$ww]." and id_user = ".$userid." ");
$row4 = mysql_fetch_array($sql4) ;
$string = "<< You Here" ;
echo "<tr><td width='100'>Week ".$row3[$ww]."</td>" ;
echo "<td width='300' >".(int) $row3["percent"] ."%</td>";
echo "<td width='300' > "?><?php echo $row4['yourplace'] ;?><?php "</td></tr>";
}
如何用第 6$row4['yourplace']
行替换第 10$string
行。
现在$row4['yourplace']
只出现在表中的特定行中,所以当我使用此代码时
$row4['yourplace'] = $string ;
这将替换但将出现在表格的所有行中。所以我想被替换并出现在指定的行中。