In this chapter we’ll develop a suggest and autocomplete feature that helps the user to find PHP functions and their official help page from http://www.php.net. The PHP functions database required for this chapter includes all the PHP functions from http://www.php.net/quickref.php.
We will implement the following features in our application:
The matching functions are retrieved as you type and displayed in a scrollable drop-down list.
The current keyword is autocompleted with the missing letters from the first suggestion returned as result. The added letters are highlighted.
The initial letters matching the search keyword are bolded in the drop-down list.
The drop-down list is scrollable, but the scroll bar appears only if the list of results exceeds a predefined number of suggestions.