Page 1 of 1

textarea to array

Posted: Mon Dec 11, 2006 1:31 pm
by kingconnections
ok, so say I have a text area, in which urls are pasted. I then want to store each of those items in an array. How can I go about accomplishing this.


What I want to accomplish is for someone to be able to paste some urls into the text area and then do something with them. In this case I would process each one by itself and evaluate it.
Thanks in advance.

Posted: Mon Dec 11, 2006 1:39 pm
by hawleyjr

Posted: Mon Dec 11, 2006 1:41 pm
by kingconnections
Thanks! you the man.

Posted: Mon Dec 11, 2006 1:42 pm
by potato
try this:

Code: Select all

$urls = $_POST['textarea'];
$urls = explode("/n", $urls);
after this the $urls is an array with the urls

i hope i helped you with this