I have a form that's posting fields via GET POST and I'm trying to query those variables against an array I've stored in a db field called 'cat'. I know I can't use the $row[cat] as is below because I haven't run the query yet. How do I get the value of the field before running the query?
// Where $row[cat] contains array stored in its field - e.g. 1,2,3
$sql = 'SELECT * TABLE WHERE '$_GET[cat]' IN (' . implode(',', $row[cat]) . ')';