title: HTML PHP How to add quantity and price value to checkbox and submit
body: <p>i am trying to create a restaurant order summary where the customer can select his order via CheckBox and quantity and get the sum of prices at the End.
  I just can't seem to figure out how to add the quantity to my code.
  It is saying at the end : You have selected Chicken (for example)
  I want it to say: You have selected 5 Chicken 
  Here it is:</p>
  
  <pre><code>&lt;body&gt;
  &lt;h3&gt;Select what you want to eat&lt;/h3&gt;
  
  &lt;form action="PlaceOrder.php" method="get"/&gt;
  &lt;input type="checkbox" name="choice[]" value="1"/&gt;Chicken,Price:8
  &lt;input name="quantity[]" type="text" /&gt;&lt;br /&gt;
  &lt;input type="checkbox" name="choice[]" value="2"/&gt;Meat,Price:3&lt;br /&gt;
  &lt;input type="checkbox" name="choice[]" value="3"/&gt;Souvlaki,Price:2.50&lt;br /&gt;
  &lt;input type="checkbox" name="choice[]" value="4"/&gt;Pizza,Price:12&lt;br /&gt;
  
  &lt;input type="submit" value="Order"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and php:</p>
  
  <pre><code>&lt;?php
  if(isset($_GET["choice"])){
  $food=$_GET["choice"];
  $quantity=$_GET["quantity"];
  $c = count($food);
  $price = 0.0;
  
  
  for ($i=0; $i&lt;$c ; $i++){
      if ($food[$i] == 1){
          $price = $price + 8;
  //here it's not working with quantity
          echo "You have selected " .$quantity." Chicken &lt;br&gt;";
      }
      if ($food[$i] == 2){
          $price = $price + 3;
          echo "You have selected Meat &lt;br&gt;";
      }
      if ($food[$i] == 3){
          $price = $price + 2.5;
          echo "You have selected Souvlaki &lt;br&gt;";
      }
      if ($food[$i] == 4){
          $price = $price + 12;
          echo "You have selected Pizza &lt;br&gt;";
      }       
     }
  
    echo "Total: ".$price . "&lt;br&gt;";
  }
  else {
  echo "Please select something!";
  }
  
  
  ?&gt;
  
  
  
  
  &lt;/body&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/6as12.png" alt="My Picture Example please view"></p>