Solved

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

Posted on 2006-11-27
2
349 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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.
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 …

679 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