title: How do i create an array from form input
body: <p>I'm trying to write a php script that takes the input from this form and creates an array with a unique key for each input box/text boxes content. </p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-3 mx-auto"&gt;
        &lt;form action="adminhandler.php"&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="product name"&gt;Enter product name&lt;/label&gt;
            &lt;input type="text" class="form-control" id="productName" aria-describedby="emailHelp" placeholder="" name="productname"&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="product name"&gt;Select product category&lt;/label&gt;
            &lt;select name="select" class=" custom-select"&gt;
            &lt;option selected&gt;Open this select menu&lt;/option&gt;
            &lt;option value="1"&gt;Formal Shoes&lt;/option&gt;
            &lt;option value="2"&gt;Sneakers&lt;/option&gt;
            &lt;option value="3"&gt;Tracksuits&lt;/option&gt;
            &lt;option value="3"&gt;Clothing&lt;/option&gt;
            &lt;option value="3"&gt;Accessories&lt;/option&gt;
          &lt;/select&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="product price"&gt;Enter product price(Naira)&lt;/label&gt;
            &lt;input type="text" class="form-control" id="productPrice" aria-describedby="emailHelp" placeholder="" name="price"&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="product name"&gt;Select image&lt;/label&gt;
            &lt;input type="file" class="form-control-file" id="productimage" aria-describedby="emailHelp" placeholder=""&gt;
          &lt;/div&gt;
          &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>