I'm converting one of my old Perl programs to PHP, but having trouble with PHP's string handling in comparison to Perl.
In Perl, if I wanted to find out if $string
contained this
, that
or the_other
I could use:
if ($string =~ /this|that|the_other/){do something here}
Is there an equivalent in PHP?