|
Posted by NC on 10/28/06 15:33
Sonnich wrote:
>
> Is the such a function like IN in delphi:
>
> if( $somechar in ["a", "b", "d"])
> dsafsakjldg;
>
> where true is for the characters mentioned above.
You can do:
if (in_array($somechar, array("a", "b", "d")))
or
if (strpos(' abd', $somechar) > 0)
Cheers,
NC
Navigation:
[Reply to this message]
|