How to Convert Range of Integers into PHP Array : <p>I'm trying to convert these integers/numbers:</p>

<pre><code>$groups = '1707,1723,1733,16254,16256,18704,19792,29268,34956';
</code></pre>

<p>into an array in PHP array:</p>

<pre><code>array("1707","1723","1733","29268","34956");
</code></pre>

<p>I'm using this</p>

<pre><code> $tags = array();
 foreach($groups as $index){
     array_push($tags, $index);
  }
</code></pre>

<p>But keep getting the below error.</p>

<pre><code> Error: Invalid argument supplied for foreach()
</code></pre>
