php send email multiple addresses code example

Example: Split 10 email out of 50 email using coma separated via php

<?php  
$emails ="[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]";
$array = explode(',', $emails);
/*// for random strings
shuffle($array); */
$count = count($array);
$res = array_slice($array, 0, 10);
print_r($res);
?>

Tags:

Php Example