can we not use an array element in a query? it doesnt seem this code below is giving me any results
$query = "SELECT * FROM classes WHERE crn = '$check[$x]'";
Try this instead:
$query = "SELECT * FROM classes WHERE crn = '".$check[$x]."'";
That will solve your problem.
thanks!
You can also use this method aswel...
$query = "SELECT * FROM classes WHERE crn ='{$check[$x]}'";
...Thats a slighty quicker way of getting your value into the query. Less typing 🙂