• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

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

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
wanted4u
Asked:
wanted4u
1 Solution
 
RoonaanCommented:
Try:

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

-r-
0
 
wanted4uAuthor Commented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now