How can I concat a string inside a for each loop? What I'm doing below works ok without the loop, but is there a way I can put the loop in there without ending the $body[{{body}}]
and starting it again?
$carrier = array (
'SAS' => array('alias' => 'sas', 'name' => 'SAS'),
'British Airways' => array('alias' => 'british_airways', 'name' => 'British Airways')
);
$body['{{body}}'] = '';
$body['{{body}}'] .= 'Line one'.
foreach ($carrier as $key=>$value) {
'<option value='.$value['alias'].'>'.$value['name'].'</option>'.;
}
'Line two'.
'Line three'.
'Line four';
print_r($body);