Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-27
2
Medium Priority
?
353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

718 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