$array = array('a', 'b', 'c', 'd', /*... letters from 3 alphabets*/);
$letter = 'some symbol, posted by user'; // real length = 1
How to get know, is $letter
one of the symbols, listed in $array
?
Like, if $letter = 'G'
and there is no G
in $array
, well then return false
.
Yep, I tried in_array()
, but there are too many symbols, is there any other (shorter) solution?