title: how to create array with explode text in php
body: <p>After all I'm sorry for my English.</p>
  
  <p>I'm writing a script in <strong>PHP</strong> and I encountered a small problem.</p>
  
  <p>The idea is to create an array per line of text and replace the fourth value with a string representing the status.</p>
  
  <p>I have a line of text e.g.
  <strong>2022,33422,0,1,0,22</strong> </p>
  
  <p>With a single line it works to create the array, but with multiple lines it creates an unexpected result.</p>
  
  <p>Example:</p>
  
  <p><strong>2022,33422,0,1,0,22</strong></p>
  
  <p><strong>2024,3232,01,1,04,298762</strong></p>
  
  <pre><code>        $myArray = explode(',', $uploadServer);
          $status = array(0  =&gt; "Unprocessed",
                   1  =&gt; "Processing",
                   2  =&gt; "Download aborted because the file became too big.",
                   3  =&gt; "Download aborted because the file downloaded too long.",
                   4  =&gt; "Download finished. Uploading to RapidShare.",
                   5  =&gt; "Upload to RapidShare finished. Job finished.",
                   7  =&gt; "Upload failed 3 times for unknown reasons. Job aborted.",
                   8  =&gt; "Upload failed because the file is black listed.",
                   9  =&gt; "Download failed for unknown reasons.",
                   11 =&gt; "Enqueued for later processing because this account already downloads 5 files at the same time.");
  
  
  
          foreach ($myArray as $valor) {
                if(array_key_exists($valor[3],$status)) {
  
                      return $passer[] = $status[$valor[3]];
  
                } else {
  
                      return FALSE;
  
                }
          }
  </code></pre>
  
  <p>The result of <strong>$myArray</strong> is</p>
  
  <pre><code>Array
  (
      [0] =&gt; 2022
      [1] =&gt; 33422
      [2] =&gt; 0
      [3] =&gt; 1
      [4] =&gt; 0
      [5] =&gt; 22
  )
  </code></pre>
  
  <p>But I need this final array</p>
  
  <pre><code>Array
  (
  [0]=&gt;array(
            [0] =&gt; 2022
            [1] =&gt; 33422
            [2] =&gt; 0
            [3] =&gt; Processing
            [4] =&gt; 0
            [5] =&gt; 22
            )
  
  [1]=&gt;array(
             [0] =&gt; 2022
             [1] =&gt; 33422
             [2] =&gt; 0
             [3] =&gt; Processing
             [4] =&gt; 0
             [5] =&gt; 22
            )
  )
  </code></pre>
  
  <p>Any idea?
  thanks</p>