Hello all.
I had this working once but, due to business dynamics, I had to change a few things ... now it is broken.
I dont seem to be getting matches at all with this code:
$function_name = explode(" ", $eQfunction);
foreach($function_name as $word){
if(!empty($job) && !empty($word)){
$word = strtolower(trim($word));
$relevancy += substr_count($word, $job);
echo 'Checking "'.$word.'" against "'.$job.'"';
if($relevancy > 0) echo ' :: gained '.$relevancy.' points.';
echo '<br />';
}
}
Here is the part of the output:
Checking "programmer" against "business opportunity/investment required"
Checking "computer" against "career fairs"
Checking "programmer" against "career fairs"
Checking "computer" against "computer services"
Checking "programmer" against "computer services"
Checking "computer" against "computers, hardware"
Checking "programmer" against "computers, hardware"
Checking "computer" against "computers, software"
Checking "programmer" against "computers, software"
Checking "computer" against "construction, mining and trades"
Checking "programmer" against "construction, mining and trades"
Checking "computer" against "consulting services"
For some reason I don't get a match on "computer services". With the code above, the expected output is that "computer services" gains 1 relevancy point for matching "computer" in "computer services".
Any help resolving this would be much appreciated.
🙂