•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,913 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,718 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 867 | Replies: 2
![]() |
•
•
Join Date: Aug 2006
Location: Netherlands
Posts: 223
Reputation:
Rep Power: 2
Solved Threads: 10
Well, to take the easier part first, the printing of each value of an array:
Now to separate email addresses, that depends on how the string with the email addresses is formatted. if it's just separated with comma's, I would use explode:
But if the separator between the email addresses isn't constant, you should indeed go with regex (with the split function).
Off course there are lots of ways of doing it. I think you could to do it with
You should post an example of the string you want splitted looks like.
<?php
foreach($array as $key => $val){
echo "$key = $val <br />";
}Now to separate email addresses, that depends on how the string with the email addresses is formatted. if it's just separated with comma's, I would use explode:
$array = explode(',', $emailString);Off course there are lots of ways of doing it. I think you could to do it with
preg_match_all();You should post an example of the string you want splitted looks like.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
advertisment blog browser cell competition daniweb email encryption eu eudora firefox gentoo gmail google imap linux microsoft mobile mozilla news onecare open source opinion outlook penelope phishing phones php professional research scam security spam spammers spamming stocks technology thunderbird virus web webmail
- Email Sending Problem in ASP.NET (ASP.NET)
- email address harvesting - prevention? (Site Layout and Usability)
- problem in sending mail form web application (ASP.NET)
- username=email address inputted on submission>is this possible (PHP)
- JavaScript -- Validating an email address (JavaScript / DHTML / AJAX)
- outlook 03 email address read as word; duplicate email (Windows Software)
- help...ip address problem...i think? (Web Browsers)
- Protecting email address from robots (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP MySQL problem
- Next Thread: Converting using ffmeg mencoder


Linear Mode