denoteone Posted April 17, 2010 Share Posted April 17, 2010 I have check box inputs in an html form that all have the name="content[]" on submit how can I save all of the items checked into a variable that I can echo. so if the boxes below are all check it could echo $content; would show name1name2name3 <input type="checkbox" name="content[]" value="name1">Name 1 <input type="checkbox" name="content[]" value="name2">>Name 2 <input type="checkbox" name="content[]" value="name3">>Name 3 Link to comment https://forums.phpfreaks.com/topic/198822-checkbox-array-saved-into-a-varible-that-can-be-sent-in-a-email/ Share on other sites More sharing options...
F1Fan Posted April 17, 2010 Share Posted April 17, 2010 If you are using the post method: echo implode('', $_POST['content']); Link to comment https://forums.phpfreaks.com/topic/198822-checkbox-array-saved-into-a-varible-that-can-be-sent-in-a-email/#findComment-1043566 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.