how to separat the emails that i have ?? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: how to separat the emails that i have ?? (/showthread.php?tid=17330) Pages:
1
2
|
how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]frrose[/eluser] hi all ! i want to ask if I have many Email like this exo@yahoo.com;[email protected];[email protected];[email protected] and i want to insert it in database but each email is alone in one record how ?? and i want it to be in form to use it any time i want thanks .. how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]gyo[/eluser] Code: $emails_string = "[email protected];[email protected];[email protected];[email protected]"; Then you just have to loop through $emails_array and insert each item into the database. Btw... are you sure that you're not going to send spam? how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]frrose[/eluser] No i won't but Grad Student lets say that we have an wrong email on it ? or some of this emails dont have ; or if tehy change the ; in new line then how ?? how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]Thorpe Obazee[/eluser] o.o huh? maybe you can explain the situation? how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]gyo[/eluser] To check the email addresses you can use the valid_email function. For the second problem you should define a separator and stuck with it; if this is not possible then you can do some regular expression to search for *@*.* where the asterisks are the user, the domain and the extension. Basically you want to search for [email protected] Hope that helps. gyo how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]frrose[/eluser] sorry suashi .. but i didnt understand how to solve the second problem :blank: could you give me an example if you dont mind how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]gyo[/eluser] I just found something that you could use: Code: <?php $emails will be the array containing all the addresses, so you can go through it with a loop. how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]frrose[/eluser] oh that is great thank you man how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]gyo[/eluser] No problem, I only hope you'll not make an email spider! how to separat the emails that i have ?? - El Forum - 04-02-2009 [eluser]frrose[/eluser] no dont worry i will not |