title: build an array multidimensional from query results
body: <p>I have this code that outputs something like:</p>
  
  <pre><code>    Array ( 
  [0] =&gt; 15 
  [1] =&gt; 13 
  [2] =&gt; 16 
  [3] =&gt; 16 
  
  [4] =&gt; 10 
  [5] =&gt; 10 
  [6] =&gt; 13 
  [7] =&gt; 13 
  )    
  </code></pre>
  
  <p>But, i want this structure:</p>
  
  <pre><code>    Array ( 
  [0] =&gt; Array ( [0] =&gt;  15, [1] =&gt;  13, [2] =&gt;  16, [3] =&gt;  16) 
  [0] =&gt; Array ( [0] =&gt;  10, [1] =&gt;  10, [2] =&gt;  13, [3] =&gt;  13) 
          ) 
  </code></pre>
  
  <p>This didn't solve : <code>$score[] = array($score_bd);</code>. Any idea ?</p>
  
  <p><strong>php code</strong></p>
  
  <pre><code>$i =0;
          foreach ($arr_user_apply as $val) {
              $new_val = array($val);
              $arr[$i] = array_merge($str, $new_arr_tags_ids, $new_val, $new_id_oferta);
  
              $sql = $db -&gt; prepare("
                  query
                  "
              );
  
              call_user_func_array(array($sql, "bind_param"), $arr[$i]);
  
              $sql -&gt; execute();
              $sql -&gt; bind_result($score_bd);
  
              while ($sql -&gt; fetch()) {
                  $score[] = $score_bd;
              };
  
              $i++;
          }
  </code></pre>