嘿,我在这里有这段代码:
<?php for($t=1; $t<=4;$t++ ){
<input name="total_hours" type="hidden" value="<?=$totalhoursweek.$t['Duration'];?>">
<?php };?>
如何动态使用变量$t
?
预期结果:
$totalhoursweek1['Duration'];
$totalhoursweek2['Duration'];
$totalhoursweek3['Duration'];
$totalhoursweek4['Duration'];