Im sure this is not to hard, but I cant seem to figure it out on my own.
I have a mysql db with a list of names, and im using the following to assembile the names into a comma seperated list.
$emailresult = mysql_query("SELECT * from leaddist")
or die(mysql_error());
while($row = mysql_fetch_array($emailresult)){
$repemail .= $row['email'] . ", ";
}
echo $repemail;
this outputs something like: name1, name2, name3, name4, name5
my question is, what are some methods to shuffle that into: name3, name1, name4, name5, name2
then when executed again, it would be something like name 4, name1, name2, name5 and so on......