我試圖保存代碼,並在同一時間每個進行多個php。可能嗎。PHP foreach多個和
$holes9 = string(lots of information separated by,)
$stroke = string(other info separated by,)
$index = string(other info separated by,)
$holes9 = explode(",",$holes9);
foreach ($holes9 as $holes) {
echo '<div class="hole"><b>'.$holes.'</b></div>
<div class="stroke"></div>
<div class="index"></div>
';
};
正如你可以看到我的foreach只適用於$ holes9作爲$ holes。我如何獲得其他兩位信息。
總是這3個字符串包含相同的元素co UNT? –
列表是否都是相同的長度? – MeLight
不要採取這種錯誤的方式,但你有沒有嘗試過學習PHP的基礎知識? –