1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php $mails = "birgit_dieltjens@hotmail.com charlinehottlet@hotmail.com els_frijters@hotmail.com khalid.mahrous@gmail.com cindy_vh@hotmail.com raphaelwarolin@gmail.com"; $arr = explode("\n", $mails); $output = ''; foreach($arr as $mail) { $output .= trim($mail).','; } echo count($arr); echo $output; ?>
1
6birgit_dieltjens@hotmail.com,charlinehottlet@hotmail.com,els_frijters@hotmail.com,khalid.mahrous@gmail.com,cindy_vh@hotmail.com,raphaelwarolin@gmail.com,