I have the following example of a series of checkboxes on a form:
<?php
echo $this->Form->input(
'reason', array(
'label'=>false,
'type' => 'select',
'multiple' => 'checkbox',
'options' => array(
'Contact me' => 'Contact me',
'Brochure request' => 'Brochure request',
'Demonstration request' => 'Demonstration request',
'Training' => 'Training',
'Support' => 'Support',
'Other' => 'Other'
)
));
?>
This is then set as a variable in the controller like:
$this->set('reason', $this->data['Contact']['reason']);
And then in the email template I have tried doing this:
<?php var_dump( implode( ', ', $reason ) ); ?>
Which gives a result like: string(28) "Contact me, Brochure request"
How do I remove those quotation marks and the string(28) prefix?
What's the best way of doing this? Thanks