Spell check not working php

I attempted to create a class that takes a list of phrases and compares that to the user inputs. What I was trying to do is get things like Porshre Ceyman to correct to Porsche Cayman for example.

This class requires an array of correct terms $this->full_model_list , and an array of the user input $search_terms. I took out the contruct so you will need to pass in the full_model_list. Note, this didn't fully work so I decided to scrap it, it was adapted from someone looking to correct large sentences ...

You would call it like so:

$sth = new SearchTermHelper;
$resArr = $sth->spellCheckModelKeywords[$search_terms]

Code [VERY BETA] :

Chủ Đề