I'm building a pizza shop for a school assignment and I am stuck with trying to get the information from an array containing the toppings Here's the code from the form. (this form is looped for several pizzas) <li><input type="checkbox" name="toppings1[]" value="pepperoni"> Pepperoni</li> PHP: and here is what I started with proccessing the order but cant get the toppings to come out of this array properly. $toppings1 = $_POST['toppings1']; ///This loop will output the topping selected for all the pizzas. foreach($toppings1 as $key => $value){ echo "$toppings1 $key $value <br>"; } //Some reason this code wont work to call a topping from the array echo $toppings1[0]<br>"; PHP: