How to setup a PHP array?
<p>Basically, I'm trying to create an array, and send the array data to my email.</p>

<p>I'm still learning PHP, and am confused about how to set everything up properly.</p>

<p>If you have any advice that can get me started, I'd really appreciate it.</p>

<p><strong>PHP</strong></p>

<pre><code>&lt;?php

if (isset($_POST['submit'])) {

    $to          = "test@mywebsite.com";
    $subject     = "New Order";
    $name_field  = $_POST['name'];
    $phone_field = $_POST['phone'];


    foreach ($food as $key =&gt; $item) {
        $body.= $key." - ".$item ["how_many"]
    }


    $food = array(
    'mexican_torta' =&gt; array('how_many' =&gt; 2, 'customize' =&gt; NO),
    'fish_sandwich' =&gt; array('how_many' =&gt; 0, 'customize' =&gt; 0)
    )
    );

    echo $food['mexican_torta']['how_many'];
}

$body = "Name: $name_field\nPhone: $phone_field\nKey: $key\nItem $item"

echo "Data has been submitted to $to!";
mail($to, $subject, $body);
?&gt;
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;div class ="item"&gt;
    &lt;img style="float:left; margin-right:15px; border:1px Solid #000; width:200px; height:155px;" src="images/mexicantortas.jpg"&gt;
    &lt;h1&gt;Mexican Torta - $8.50&lt;/h1&gt;
    &lt;h2&gt;How Many? &lt;font color="#999999"&gt;Ex: 1, 2, 3...?&lt;/font&gt;&lt;/h2&gt; 
    &lt;input type='text' name='food[mexican_torta][how_many]'&gt;
    &lt;h3&gt;Customize It? &lt;font color="#999999"&gt;Ex: No Lettuce, Extra Cheese...&lt;/font&gt;&lt;/h3&gt; 
    &lt;input type='text' name='food[mexican_torta][customize]'&gt;
&lt;/div&gt;&lt;!-- ITEM_LEFT --&gt;

&lt;div class ="item"&gt;
    &lt;img style="float:left; margin-right:15px; border:1px Solid #000; width:200px; height:155px;" src="images/fishsandwich.jpg"&gt;
    &lt;h1&gt;Fish Sandwich - $8.50&lt;/h1&gt;
    &lt;h2&gt;How Many? &lt;font color="#999999"&gt;Ex: 1, 2, 3...?&lt;/font&gt;&lt;/h2&gt; 
    &lt;input type='text' name='food[fish_sandwich][how_many]'&gt;
    &lt;h3&gt;Customize It? &lt;font color="#999999"&gt;Ex: No Lettuce, Extra Cheese...&lt;/font&gt;&lt;/h3&gt; 
    &lt;input type='text' name='food[fish_sandwich][customize]'&gt;
&lt;/div&gt;&lt;!-- ITEM_LEFT --&gt;
</code></pre>
