【发布时间】:2013-07-14 12:14:03
【问题描述】:
这就是我将数组存储到数据库中的方式(更大代码的一部分):
echo '<form action="" method="post">';
for ($count = 0; $count < $_GET["entries"]; $count++)
{
echo 'Enter a beginning to ending date for the week: <input type="text" name="week"><br/>';
}
echo '<input type="submit" name="submit"></form>';
它在一个标签内,因此是回声。
我检查了我的数据库,我可以看到第一个日期,所以它正在被存储。
这就是我显示数组的方式(似乎不起作用):
我哪里出错了?它只是输出还是输入?对于可能的答案,我真的很感激任何建议。谢谢。
Current Specific Weeks: <?php
foreach ($currentWeeks as $currentWeeks)
{
echo "{$currentWeeks}\n";
}
【问题讨论】:
标签: php sql arrays forms foreach