Hey, i'm try to search a list of words for matches using afew characters.
So for example I will have the word "phone" in this list, and then I have the characters "hpnoe" which will spell phone in the correct order.
But it seams my expression "[hpnoe]" is not matching "phone" unless the letters are in the correct order. Anyone know why?
PHP Code:
$matches = array();
foreach ($pos_words as $word) {
preg_match('['.$chars.']', $word, $matches);
}