title: How to add more than one new value to array via html form, in PHP?
body: <p>I want to add new values in php array by html form. I wrote something like following in php:</p>
  
  <pre><code>$b=array();
  $b[]=$_POST['unos'];
  </code></pre>
  
  <p>and something like this in html:</p>
  
  <pre><code>&lt;form action="?" method="post"&gt;
  &lt;input type="number" name="unos"  id="unos"&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>And that code do the job, but only for one value. In other words, I am asking how to import more than one value in array. I add value="3"
       <br>
  in html input form, but that does not works, of course, or it is just one part of the answer. How to tell php to allow adding more than one value in array via html form?</p>
  
  <p>UPDATE:</p>
  
  <p>I want to import more values in one input field, that would be separated with "," for example, or whatever convention is.</p>
  
  <p>UPDATE:</p>
  
  <pre><code> &lt;?php
   $unos=array();
   $unos[]=$_POST['unos'];
   $rezultat=count($unos); /*number of n's*/
   $zbir=array_sum($unos); /*total sum of n's*/
   $av=$zbir/$rezultat;    /*average value of n's*/
   echo "average value is $av&lt;/br&gt;";
   }
   ?&gt;
   &lt;form action="?" method="post"&gt;
   &lt;input type="number" name="unos"  id="unos"&gt;
   &lt;input type="submit" value="Submit"&gt;
   &lt;/form&gt; 
  </code></pre>
  
  <p>The code calculate average value of n's. I am beginner and just want to know how to add values of arrays by user via html.The reason I wanted to know how one can do that in 1 input file is because I do not want to limit number of values with number of input fields. I want make that user can add values as many as he want. Sorry, my English is not perfect.</p>