I have a url that looks like this: website.com?id=1,2
$urlParam = $_GET['id'];
echo $urlParam;
$urlParam returns 1,2 as expected. However....i'm trying to use it to query a mysql database (I think that's the right phrase for what i'm doing??). This works:
$query->where(array(
'id:IN' => array(1,2)
));
This does not work:
$query->where(array(
'id:IN' => array($urlParam)
));
I don't get it! Why?? Also...I barely have any idea what i'm doing, so I'm sure there's a more efficient way to do all this but this is what I was able to come up with.