title: A better php array_merge
body: <p>I am looking to do this a better way without the need to hardcode the integers for <code>$justPrices[$i]</code>:</p>
  
  <pre><code>$pricesResult = array_merge($justPrices[0], $justPrices[1], $justPrices[2], $justPrices[3]);
  </code></pre>
  
  <p><code>$justPrices</code> is a multidimensional array, containing 4 'bands' of prices within each array. The data for <code>$justPrices</code> being for example:</p>
  
  <pre><code>Array ( [0] =&gt; Array ( [0] =&gt; 40.95 [1] =&gt; 39.95 [2] =&gt; 39.45 [3] =&gt; 38.95 ) [1] =&gt; Array ( [0] =&gt; 45.80 [1] =&gt; 41.80 [2] =&gt; 41.50 [3] =&gt; 41.40 ) [2] =&gt; Array ( [0] =&gt; 45.95 [1] =&gt; 42.95 [2] =&gt; 41.95 [3] =&gt; 41.45 ) [3] =&gt; Array ( [0] =&gt; 50.00 [1] =&gt; 50.00 [2] =&gt; 50.00 [3] =&gt; 50.00 ) )
  </code></pre>
  
  <p>The issue is that the amount of arrays within <code>$justPrices</code> will vary from at least 2 to 10+. So I need a way for the parameters for the <code>array_merge()</code> function to vary dependent on the amount of arrays within <code>$justPrices</code>. I was going to use this simple method to get the amount of arrays within <code>$justPrices</code>:</p>
  
  <pre><code>$justPricesMax = count($justPrices);
  </code></pre>
  
  <p>I could write a <code>for loop</code>, and I might still, I just wondered if there was a better method for what seems on the surface relatively simple!</p>