Let's say i have an array
$smileys = array(':)', ':(', ':D')
and i want to match part of that array how can i use preg_match to achieve this? Here's what i tried but it didn't work
if($preg = preg_match('/[[:alnum:]]/i', $smileys, $matches))
print_r($matches);
The error i get is
Warning: preg_match() expects parameter 2 to be string, array given