I have a variable $genres
$genres can equal anything from one to many genres. They are seperated by commas and they have single quotes around all of them.
example values of $genres:
$genres = 'Jazz'
or
$genres = 'Jazz,'Blues','Rock','Folk','Indie'
is there a way to detect if a word is in genre like Jazz?
I'm going to need to check for all genres individually to see if they are in the array.
The reason is because if they already selected it, I want the checkbox to keep it checked
example:
if($genres=='Jazz'){
echo "<input type='checkbox' name='genre' value='Jazz' CHECKED />";}
else{
echo "<input type='checkbox' name='genre' value='Jazz' />";}
Thanks