title: Break large string into array of smaller groups?
body: <p>So I have a string of comma-separated IDs like so:</p>
  <pre><code>$requestids = &quot;22952,22957,22962,22968,22978,22980,22998,23001,23114,23118,23196,23198,23240,23280,23436,23440,23448,23465,23467,23470,23565,23619,23685,23687,23689,23701,23706,23708,23710,23713,23718,23720,23725,23732,23734,23745,23748,23751,23762,23781,23793,23856,23858,23860,23894,23896,23937,23943,23945,23947,24074,25295,25296,25297,25298,25299,25300,25301,25303,&quot;
  </code></pre>
  <p>I can use <code>$requestIdsArray = explode(&quot;,&quot;,trim($requestids,','));</code> to break this string into an array, with each ID being a new value, but what I'd really like to do is create an array where each value contains groups of 20 IDs. Like this:</p>
  <pre><code>array(
  [0] =&gt; 22952,22957,22962,22968,22978,22980,22998,23001,23114,23118,23196,23198,23240,23280,23436,23440,23448,23465,23467,23470,
  [1] =&gt; 23565,23619,23685,23687,23689,23701,23706,23708,23710,23713,23718,23720,23725,23732,23734,23745,23748,23751,23762,23781,
  [2] =&gt; 23793,23856,23858,23860,23894,23896,23937,23943,23945,23947,24074,25295,25296,25297,25298,25299,25300,25301,25303,
  )
  </code></pre>
  <p>How can this be achieved in php?</p>