I'm having a problem with selecing some SQL records and going through them to find matches. The basic idea is that theres an array called keywords which has all the user keywords, and I select each SQL row, and try and match it's keywords values with each keyword in the array (using two while loops), which looked like this (in psedocode form);
while there is a record to fetch
count1 is 0
while count1 <= number of keywords
count2 is 0
while count2 <= number f keywords
if preg_match(user keyword, record keywords) then
matches++
else
do nothing
count2++
endwhile
count1++
endwhile
endwhile
The offending article is the preg_match function, which has the following syntax;
if (preg_match($keywords[$count2], $data[keywords])) {
$matches++;
}
else {
}
It says something about the delimiter not being allowed to be alphanumeric or backslash, and I've no idea what that means, or even what a delimiter IS. Can anyone help? ;X