How can compare each a from content json_encode that inserted in database with a string as shorthand code without use loop? (this values was checkbox that inserted in database with json_encode)
Example
$json_encode = ["how", "are", "hello", "what"];
echo ($json_encode == 'hello') ? 'It is true' :'';
The code is a little bit of a ’round a bout’ way of doing things but this should do the trick:
Your initial $json_encode isnt setup correctly as a proper JSON string, and required decoding to use the array checking functionality later on.
A better approach maybe: