title: PHP - Array result
body: <p>I have a big problem with a array and I want to group by key (or I don't now :( )</p>
  
  <p>I get the links from mySQL and I do the following:</p>
  
  <pre><code>$lien2 = $links2['text'];
  $lien2 = stripslashes($lien2);
  $lien2 = htmlspecialchars($lien2);
  $lien2 = nl2br($lien2);
  preg_match_all('#http://.*?\.?([a-zA-Z0-9\-]+)(\.[a-zA-Z0-9]+)/[a-zA-Z0-9\/\*\-\?\&amp;\%\=\,\.\;\#\_]+#i', $lien2, $lien2_result, PREG_SET_ORDER);
  </code></pre>
  
  <p>This is the array $lien2_result:</p>
  
  <pre><code>    Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; links1
              [1] =&gt; A
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; links2
              [1] =&gt; B
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; links3
              [1] =&gt; C
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; links4
              [1] =&gt; B
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; links5
              [1] =&gt; D
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; links6
              [1] =&gt; E
          )
  
  )
  </code></pre>
  
  <p>and I want to get the following result:</p>
  
  <pre><code>A
  links1
  B
  links2
  links4
  C
  links3
  D
  links5
  E
  links6
  </code></pre>