title: array_push created array is acting strangely. When attempting to output associative array value returns first letter of Array or "A"
body: <p>I am attempting to use a foreach to output the array below. I have created this array via array_push() based on preg_match if/else. </p>
  
  <pre><code>Array (
      [0] =&gt; Array (
          [date] =&gt; 
          [clickurl] =&gt; some data
          [url] =&gt; some data
          [dispurl] =&gt; some Data...
          [title] =&gt; Transformers: Revenge of the Fallen : Reviews
          [abstract] =&gt; "Transformers: Revenge of the Fallen" is a horrible experience of unbearable length, briefly punctuated by three or four amusing moments.
      )
  
      [1] =&gt; Array (
          [date] =&gt; 
          [clickurl] =&gt; some data
          [url] =&gt; some data
          [dispurl] =&gt; some Data...
          [title] =&gt; Transformers : Reviews
          [abstract] =&gt; After a string of bad-to-mediocre films, director Michael Bay scores with blockbuster battling robots in "Transformers."
      )
  )
  </code></pre>
  
  <p>When attempting to output the array:</p>
  
  <pre><code>foreach ($reviewArr as $review) {
      echo($review['clickurl']. '&lt;br/&gt;&lt;br/&gt;');
  }
  </code></pre>
  
  <p>The output is "A" which is the first letter of Array at the start of the array above. This is the same result as using <code>$review[0];</code> </p>
  
  <p>When using: </p>
  
  <pre><code>foreach ($reviewArr as $review) {
      echo($review. '&lt;br/&gt;&lt;br/&gt;');
  }
  </code></pre>
  
  <p>the output is: </p>
  
  <pre><code>Array ( 
      [date] =&gt; 
      [clickurl] =&gt; some data 
      [url] =&gt; some data
      [dispurl] =&gt; some data... 
      [title] =&gt; Transformers : Reviews 
      [abstract] =&gt; After a string of bad-to-mediocre films, director Michael Bay scores with blockbuster battling robots in "Transformers." 
  ) 
  </code></pre>
  
  <p>I am not sure why this is happening. Any help will be greatly appreciated.</p>
  
  <p>thanks!</p>
  
  <p>UPDATE = </p>
  
  <p>This is the original Array that I parse below to split into two different arrays.</p>
  
  <pre><code>Array
      (
  [bossresponse] =&gt; Array
      (
          [responsecode] =&gt; 200
          [web] =&gt; Array
              (
                  [start] =&gt; 0
                  [count] =&gt; 14
                  [totalresults] =&gt; 14
                  [results] =&gt; Array
                      (
                          [0] =&gt; Array
                              (
                                  [date] =&gt; 
                                  [clickurl] =&gt; http://url.com/1
                                  [url] =&gt; http://url.com/1
                                  [dispurl] =&gt; http://url.com/1...
                                  [title] =&gt; Title of Content 1
                                  [abstract] =&gt; This is the summary, This is the summary,    This is the summary, ...
                              )
  
                          [1] =&gt; Array
                              (
                                  [date] =&gt; 
                                  [clickurl] =&gt; http://url.com/2
                                  [url] =&gt; http://url.com/2
                                  [dispurl] =&gt; http://url.com/2...
                                  [title] =&gt; Title of Content 2
                                  [abstract] =&gt; This is the summary, This is the summary,  This is the summary, ...
                              )
                      )
  
                )
  
         )
  
  )
  </code></pre>
  
  <p>This is how I am setting the $reviewArr[].</p>
  
  <pre><code>foreach ($results['bossresponse']['web']['results'] as $key =&gt; $result) {
                  $url = $result['clickurl'];
                  $title = $result['title'];
                  $abstract = $result['abstract'];
                  $resultItem = print_r($results['bossresponse']['web']['results'][$key], true);
                  if (preg_match ("/reviews/i", "$url")) {
                      array_push($reviewArr, "$resultItem");
                  } else {
                      array_push($resultsArr, "$resultItem");
                  }
              }
  </code></pre>
  
  <p>UPDATE #2 -</p>
  
  <p>I see thanks to @fabio that I am simply setting a string with <code>$resultItem</code> above. How can I achieve creating a multidimensional array? How can I build this as an array - all of my attempts returned errors, or a string. </p>
  
  <pre><code> Array
                      (
                          [0] =&gt; Array
                              (
                                  [date] =&gt; 
                                  [clickurl] =&gt; http://url.com/1
                                  [url] =&gt; http://url.com/1
                                  [dispurl] =&gt; http://url.com/1...
                                  [title] =&gt; Title of Content 1
                                  [abstract] =&gt; This is the summary, This is the summary,    This is the summary, ...
                              )
  
                          [1] =&gt; Array
                              (
                                  [date] =&gt; 
                                  [clickurl] =&gt; http://url.com/2
                                  [url] =&gt; http://url.com/2
                                  [dispurl] =&gt; http://url.com/2...
                                  [title] =&gt; Title of Content 2
                                  [abstract] =&gt; This is the summary, This is the summary,  This is the summary, ...
                              )
                      )
  </code></pre>