So I have a basic json file:
{
"User1": {
"id": 1,
....
},
"User2": {
"id": 3
....
}
}
I want to get all the names of the users (i.e. "User1" or "User2") and check if a name entered by a user is equal to one of those names.
I've tried this but it doesn't work:
foreach($this->blackList as $user) {
if($user == $username)
return "TRUE";
}
return "FALSE";
}