Let's say i have an array
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
The error i get is
PHP Code:
$smileys = array(':)', ':(', ':D')
Here's what i tried but it didn't work
PHP Code:
if($preg = preg_match('/[[:alnum:]]/i', $smileys, $matches))
print_r($matches);
HTML Code:
Warning: preg_match() expects parameter 2 to be string, array given
Comment