I want to know if variables can be used in an array. see below ($userArray = array($usersBought);)
$user = "Darren";
$usersBought = $row['usersBought'];
$userArray = array($usersBought);
if (in_array($user, $userArray)) {
$button = "yes";
}
If this can work, what should the text be in the database? I have tried this...
"Darren","Adam","Coral"
Darren,Adam,Coral
Darren Adam Coral
This array is in a while loop and displays multiple unordered lists on a page through the loop. That is why i have the $usersBought = $row['usersBought']; there
$row['usersBought']?