PHP: email subject
<p>I have a form on an intranet and when someone fils out the form it sends an internal email to a certain department.<br>
I'm trying to get one of arrays to populate into the subject line but just can't figure out how. </p>

<p>The way I populate the array into the body which works fine is as follows:</p>

<pre><code>&lt;?php
    # .. snip ..
    $message = $message.'&lt;tr&gt;
    &lt;td colspan="4" valign="top" class="style7"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;';                                                                                                                     
    for($i = 0; $i &lt; count($arrEncoding); $i++) {
        $desc= $arrEncodingDesc[$i];    
        $value= $arrEncoding[$i];                                                         
        if ($_POST[$arrEncoding[$i]]) {                                  
            $message = $message.'&lt;tr&gt;&lt;td colspan="4" valign="top" class="style4"&gt;'.$desc.'&lt;/td&gt;&lt;/tr&gt;';                               
        }
    }
    # .. snip ..
?&gt;
</code></pre>

<p>I tried a number of ways and below is just an example of one of the ways I've tried it:</p>

<pre><code>$subject = $message.'Event Request Form:'.$arrEncoding[$i];
</code></pre>

<p>So basically I need the array of arrEncoding to populate into the subject field.<br>
Any help would be greatly appreciated. I don't know if my question is concise enough, I'm still very much a beginner to the whole php world.</p>
