Search for specific symbol inside array

Gentvaspspate

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