memory issue when trying to create an array
<p>I have a form my company uses to create some files on the fly based on the input.  I have a text area<code>$fileString</code> and they can enter file names followed by a hard return.  I take that and create an array, <code>$list</code>.  What i'm trying to do is if they enter in the text area two file names like this:</p>

<pre><code>item1

item2
</code></pre>

<p>that it will create an array that contains 6 values, not two, so like this:</p>

<p><code>$genList = array(item1_f, item1_b, item1_i, item2_f, item2_b, item2_i);</code></p>

<p>I am getting this error though when I run my code:</p>

<pre><code>Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 24 bytes) in /home/dcolor/public_html/dev/create.php on line 18
</code></pre>

<p>Line 18 is:</p>

<pre><code>array_push($genList, $list[0] . "_f", $list[0] . "_b", $list[0] . "_i");
</code></pre>

<p>What am I doing wrong here?  Code below</p>

<pre><code>    $fileString = $_POST['fileList'];
    $unique = $_POST['unique'];
    $size = $_POST['size'];
    $generateArray = $_POST['generateArray'];
    $list = explode("\r\n",$fileString);

    if ($generateArray == "yes") {      
        if ($size == "5x7inimpos") {
            $genList = array();
            while (!empty($list)) {             
                array_push($genList, $list[0] . "_f", $list[0] . "_b", $list[0] . "_i");                    
            }
        }
        print_r($genlist);
    }
</code></pre>
