如何在forloop()中将数组转换为字符串?

时间:2017-06-20 19:23:10

标签: php arrays string for-loop

嘿,我在这里有这段代码:

 <?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'];

0 个答案:

没有答案