Explode in php for DataBase
<p>It's not working when I get the value from a url like <code>selected.php?aa=2,3,</code></p>

<pre><code>$mainclass  = $_GET['aa'];
$classarray = explode(",", $mainclass);
$classarray = array_walk($classarray, 'intval');
$classa     = implode(',', $classarray);

$makefeed = mysql_query("SELECT * FROM studentnew WHERE fieldname IN (".$classa.")"); while ($cc = mysql_fetch_array($makefeed))  { }
</code></pre>
