0
...
$count=1;
while ($row = mysql_fetch_array($result)){
$result1 = mysql_query("SELECT something from something where name like %$row['name']% ");
while ($data = mysql_fetch_array($result1)){
echo $data[title];
echo $count;
}
$count++
}
我該如何在foreach中增加一個數字?第一個foreach結果爲第二個查詢。然後計算2ed foreach的所有結果。我的代碼引起如何在2 foreach中增加數字?
title1 1
title2 1
title3 2
title4 2
title5 2
title6 3
如何使
title1 1
title2 2
title3 3
title4 4
title5 5
title6 6
感謝。