With the help of SO, I was able to get the “keyword” from the subject line of the letter for use as a category. Now I decided to allow several categories for each image, but I can not correctly formulate my question in order to get a good answer from Google. preg_match stops at the first word in the list. I'm sure this has something to do with being “impatient” or just replacing the pipe symbol | by something else, but I just don't see it.
\b(?:amsterdam|paris|zurich|munich|frankfurt|bulle)\b .
The whole line I'm currently using is:
preg_match("/\b(?:amsterdam|paris|zurich|munich|frankfurt|bulle)\b/i", "." . $subject . ".", $matches);
All I have to do is pull out all these words if they are present, as opposed to stopping in Amsterdam, or something else first in the subject that he is looking for. After that, it's just a question with the $ matches array, right?
Thanks Mark
source share