标量值作为数组出错

时间:2013-11-14 08:43:25

标签: php arrays scalar

有些人可以帮助我使用标量值作为数组时出现错误吗?

$getal = $_POST['getal'];

For($teller=1; $teller<=11; $teller=$teller+1)
{
    $uitkomst[$teller]=$teller*$getal;
}

1 个答案:

答案 0 :(得分:1)

$getal = $_POST['getal'];
$uitkomst = array();
For($teller=1; $teller<=11; $teller=$teller+1)
{
  $uitkomst[$teller]=$teller*$getal;
}