How to traverse PHP Array from HTML TextArea Input?
<p>Whenever I receive input such as from a HTML Textarea box:</p>

<pre><code> joeschmo@gmail.com:25wfsfrs
 johnbrown@yahoo.com:324dasd
 janedoe@yahoo.com:3dsadasd
</code></pre>

<p>I want to use the PHP function explode() on the colon and print out a list such as:</p>

<pre><code>Usernames:
1st Email
2nd Email
3rd Email

Passwords:
1st Pass
2nd pass
3rd Pass
</code></pre>

<p>Code so far:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;
Usernames AND Passwords!
&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;


&lt;?php
/*Print contents of textarea for testing purposes.*/

$data = explode("\n", $_POST['uandp']);
foreach($data as $value){
    echo $value;
}

/*Split username and password*/
$string = $_POST['uandp']; 
list($string1,$string2) = explode(":",$string);  
/*$string1 = username, $string2 = password*/ 
$new_string = $string1;
$new_string2 = $string2;
/*$new_string = Username*/
/*$new_string = Password*/

echo $new_string;
echo $new_string2;
?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Not sure where to go from here. I know I have to store the textarea form data into an array and parse it from there.</p>
