title: append new data to multidimensional array
body: <p>please help me out.  I want to append new data to a multidimensional array but structure it the same way the original was structured.  Here's what I have right now:</p>
  
  <pre><code>&lt;?php
  session_start();
  $ses = session_id();
  if (isset($_POST['title'])){
  if(!empty($_SESSION[$ses])){
      $title = $_POST['title'];
      array_push($_SESSION[$ses], $title);
      array_push($_SESSION[$ses], $_POST['desc']);
  }else{
      $title = $_POST['title'];
      $_SESSION[$ses] = array(array($title, $_POST['desc']));
  }
  }
  ?&gt;
  </code></pre>
  
  <p>Right now the output looks like this:</p>
  
  <pre><code>Array
      (
      [0] =&gt; Array
                  (
          [0] =&gt; 1
          [1] =&gt; 2
                  )
  
          [1] =&gt; 3
          [2] =&gt; 4
  )
  </code></pre>
  
  <p>But I want the 3 and 4 to be appended like this:</p>
  
  <pre><code>Array
      (
      [0] =&gt; Array
                  (
          [0] =&gt; 1
          [1] =&gt; 2
                  )
      [1] =&gt; Array
                 (
          [1] =&gt; 3
          [2] =&gt; 4
        )
  )
  </code></pre>
  
  <p>How can I modify my code to achieve that?  I'm really stuck, please help!!!</p>