Form API-built form only emails Array, not the form results I am having a special moment here:
I need to send an email with form results. These form results are in two fieldsets. This should be the easiest part of building this, but I'm having a brain freeze. How can I use a foreach loop or something similar to print my form results to the email being sent? Here's what I wrote, which just says 1 instead of the full results array:

     $uppgifter = $form_state['values']['dina_uppgifter'];
     foreach($uppgifter as $key=&gt;$value) {
        if ($value &gt; 0) {
            $params['message'][] .= "&lt;p&gt;&lt;strong&gt;" . $key . ": &lt;/strong&gt;" . $value . "&lt;/p&gt; &lt;br /&gt;";
        }
    }
This line is probably the problem:

$params['message'][] .= ...


If $params['message'] is a string then you want to be concatenating directly to that string like this:

$params['message'] .= ...


When you put empty square brackets [] on the end of a variable PHP treats that variable as an array and essentially pushes whatever's after the = sign on to the array.

The way you're doing it (with a string concatenation of .=) I'm not actually sure what the logic flow would be but it wouldn't be pretty...I'm surprised you don't get a fatal error for this :)