How can you search a partial string when typing (not to use MySQL) like the LIKE function in MySQL but using PHP when searching a string, e.g.
strpos() can do that.
if(strpos($string, $find) !== false) . . .
Note that it may return 0, so do use the type-equals operator.