title: Splitting comma separated string of likes into smaller parts
body: <p>What is the best way to split a comma separated list of 50++ numbers (FB page IDs) into smaller chunks and deal with them <em>n</em> at a time?  The list will look like:</p>
  
  <pre><code>$likeslist="266037406871517,81337462601,34782298000891,56859608486,8797601255,48126111909968,8807449704,3634204295,6840064056,16627954050,7581229254,282681243370,356780606553962,207549746039055,13708123117519,204852972922619,407056596017784,584207664985882,11141618921610,66707529019,271953746236343,9576298621,40575497158,29252725868524,210237443769975,469586875072133,32693104762450,262744428996,506144412803606,52385706779438";
  </code></pre>
  
  <p>Because the total number in $likeslist will vary (could be hundreds), is it faster to get the total number we are working with using explode or substr_count? (<strong>question 1</strong>)</p>
  
  <pre><code>$likesarray = explode(",", $likeslist);
  $result = count($likeslist);
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>$listtotal = substr_count($likeslist, ",") +1;
  </code></pre>
  
  <p>Then, how can I divide $likeslist into smaller groups (of say, 5) and loop through each ID within in each group? (<strong>question 2</strong>)</p>