title: PHP explode(), delimiter being returned?
body: <p>I'm not sure why but the explode function doesn't seem to be working for me.</p>
  
  <p>I have a string which contains one or more sets of comma-seperated values. These sets are delimied by starting / ending square brackets.</p>
  
  <p>After stripping off the ending "[" and "]", I thought it would be simple to then use the explode function to get the results seperated by "][". Instead, I get something weird.</p>
  
  <pre><code>$rawInserts = '[1,2,3,4,5][2,3,4,5,6][3,4,5,6,7]';
  $the_inserts = substr($rawInserts,1,strlen($rawInserts)-2);
  echo "$the_inserts \n"; //returns "1,2,3,4,5][2,3,4,5,6][3,4,5,6,7"
  $inserts = explode($the_inserts , "][");
  echo print_r($inserts)."\n"; // returns one item array containing "][";
  </code></pre>
  
  <p>why is it returning "]["? (FYI, I tried this exact example and it fails).</p>
  
  <p>Thanks in advance.</p>