I'm trying to check if one of my fields CONTAINS (rather than is equal to) an item grabbed from my $user variable. My field (field_targetuser) contains a string of numbers: 45, 409, 47, 100.
I'm trying to see if field_targetuser contains the grabbed uid (47). How should I be writing the below in order to accomplish this? Apologies for my newbness.
global $user;
if($user->uid == $data->field_targetuser)
{
return false;
} else {
return true;
}