如何在 PHP 的循环中接受来自用户的值并将其存储在数组中.我绑定了以下代码.它不起作用


how to accept values from the user within a loop in php and store it in an array..i tied the following code..its not working

         $prob=array(10);
        echo "enter the probabilites:";
        for($i=0;$i<$max;$i++)
        {
              echo"<script language='javascript'>$prob[$i]=prompt('Enter the values');</script>";
        }  

如何在PHP的循环中接受来自用户的值并将其存储在数组中。我绑定了以下代码。它不起作用请帮忙!!我想将值存储到数组概率中。我希望用户输入值。我尝试使用提示,但它不起作用。.

我认为

您不清楚服务器上正在做什么以及在客户端上正在做什么。 我认为您希望您的页面有一个将输入数据的表单;然后表单数据将被提交到(可能是相同的(服务器 PHP 例程。