Solved

explode ("\n\r", $_GET["email"]); doesn't work

Posted on 2006-11-27
2
336 Views
Last Modified: 2009-12-16
Hi Expert,

The following doesn't work.

$emailadressen=explode ("\n\r", $_GET["email"]);

$_GET["email"] is a text area.
The user can give in multiple e-mail adressen seperate them with line feeds.
The explode function don't work. I've also tried with only "\n" of "\n\r" or "\r\n".
Do I something wrong here?

Regards,

V.R. Jansen
0
Comment
Question by:wanted4u
2 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 125 total points
ID: 18018230
Try:

$emailadressen=preg_split("/\r?\n\r?/", $_GET["email"]);

-r-
0
 

Author Comment

by:wanted4u
ID: 18018460
Hi Roonaan,

I've make a mistake somewhere else in the program, so I make a wrong conclusion..
$emailadressen=explode ("\r\n", $_GET["email"]); works perfectly, but your solution is maybe safer to use and works also perfect.

Thanks ....
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now