i have some understanding difficulties. i have some checkboxes in html like this:

```
<input type="checkbox" name="a[]" value="1">
<input type="checkbox" name="a[]" value="2">
<input type="checkbox" name="a[]" value="3">

```

i like to evaluate multiple choices of a[] to see what was selected thats why i have to use an array.

okay, now the problem is: after submit i have posted that array.

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

    $a = $_POST['a'];
}

```

further i like to set some message into another array for each value that is selected:

```
if ($a === '1'){
   $msg[] = "text1";
}
if ($a === '2'){
   $msg[] = "text2";
} and so on...

```

now i have stored these messages to the array `$msg[]`

the next step and here comes my real problem:

i like to display the whole selection in a mail that will be send. so up to that point i have:

```
$to = "a@b.cd";
$subject = "some text";
$message = "some text... 

show what was selected:

$msg

end text";...

```

so normally i know that i have to use foreach like:

```
<?php if(isset($msg)):?>
    <?php foreach($msg as $m):?> 
        <p>
        <?php echo $m;?>
        </p>
    <?php endforeach;?>
<?php endif;?>

```

to make it visible. my problem is to implement this into that message from the mail into that quotation marks.

so if there is someone who could help me out, i really would appreciate.

thanks a lot.