Let's say I have an array like this:
$mail[0] = "test1@gmail.com";
$mail[1] = "test2@gmail.com";
$mail[2] = "test3@gmail.com";
$mail[3] = "test4@gmail.com";
$mail[4] = "test5@gmail.com";
$mail[5] = "test6@gmail.com";
Now I want to convert these mails to string and put them in array after every 3 mail of $mail separated by a comma. Something like this -
$email[0] = "test1@gmail.com, test2@gmail.com, test3@gmail.com";
$email[1] = "test4@gmail.com, test5@gmail.com, test6@gmail.com";
$email[2] = "test71@gmail.com, test8@gmail.com, test9@gmail.com";
How can I do this ?