so i have this text file that stores many email addresses like this: blah@blah.com, blah2@blah.com, ..... and i want to alphabetize all these email addresses. im trying to split the string into an array and then sort it. but the problem is is that php does not think its an array. ive tried so many options and i would really like some help or even more ideas for me to fiddle around with. thanks in advance. -phil
$recipients = "./emails.txt";
$fp = fopen($recipients, "r+");
$emails = fread($fp, filesize($recipients));
$emails = sort(split(", ", $emails));
........
while(list(,$arraycontent) = each($emails)) {
echo $arraycontent . ", ";
}