Select2 is a widely used jQuery plugin. It makes select element user-friendly.
After initializing it adds style and a search box. Based on the search text it filters the options.
It allows loading data dynamically using jQuery AJAX.
In this tutorial, I show how you can initialize select2 plugin and load data dynamically using AJAX PDO and PHP.