I have written the below code to display checkboxes after implementing
habtm helper class (from bakery)
controller code:
$this->set('languages', $this->Language->generateList(
null, null, null, "{n}.Language.language_name",
"{n}.Language.language_id")
);
view code:
Languages <?php echo $habtm->checkboxMultiple('Client/languages',
$languages);?> <p>
checkboxes are displayed correctly.
I want the data to be inserted into database with comma inbetween so,
in the controller i have written the code,
$langArr=$this->data['Client']['languages'];
$imp=implode(',',$langArr);
echo $imp;
output:
,English, French
1 There is a coma before the word English.
Is there any wrong in the implentation? Please let me know.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---