Thread: PHP Guys - Help
View Single Post
Old 02-03-2005, 07:38 AM  
rvincent
Confirmed User
 
Join Date: Feb 2005
Posts: 431
$input = 'this input contains variable1...';
$array = array('variable1', 'variable2', 'variable3');

if(preg_match('/'.implode('|', $array).'/', $input)) { echo "Found"; }





That is it :-)
rvincent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote