woolyg Posted September 24, 2007 Share Posted September 24, 2007 Hi all, Can anyone help me with this one? I have a list of email addresses in a variable. There could be 5, there could be 500, and they're all mixed around in no certain order.. $mailing_list = "[email protected], [email protected], [email protected], [email protected]"; $arr = explode(", ",$mailing_list); is there a way to print $arr, specifically leaving out one of the email addresses? Say if I wanted to print everything in the $mailing_list contents EXCEPT [email protected], how would I go about it? All help appreciated. Woolyg Link to comment https://forums.phpfreaks.com/topic/70444-printing-an-array-minus-certain-data/ Share on other sites More sharing options...
jitesh Posted September 24, 2007 Share Posted September 24, 2007 <?php $mailing_list = "[email protected], [email protected], [email protected], [email protected]"; $mailing_list = str_replace(array("[email protected]","[email protected]",", ,"),"",$mailing_list); echo $mailing_list; ?> Link to comment https://forums.phpfreaks.com/topic/70444-printing-an-array-minus-certain-data/#findComment-353876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.