title: extract elements from php array and assign as variables
body: <p>I have been working on this for a while and cannot seem to figure it out at all. Any help would be appreciated. here we go. </p>
  
  <p>I have an html form that has a text box and a submit button. the text entered in the text box is posted to my .php processor form. Once it gets here, I use:</p>
  
  <pre><code>$textdata = $_POST['textdata'];
  
  $input = explode("\n", $textdata);
  </code></pre>
  
  <p>this takes the data, splits it by line, and stores each line in an array called <code>$input</code>.
  from here i can echo <code>$input[0]</code> to get the first line and so on. But I need to use this further down in my script and need to assign a variable to the first line, or <code>$input[0]</code>.
  <code>$input[0] = $line1;</code> does not work. I think I might have to use <code>extract()</code> and a foreach loop? Any help would be greatly appreciated. thanks!</p>