I am testing select2 plugin in my local machine. But for some reason. it is not collecting the data from database.
I tried multiple times but not
Configuration for select2 v4+ differs from v3.5+
It will work for select2 v4:
HTML
JS
$(".tags-select").select2({ tags: true, ajax: { url: "fetch.php", processResults: function (data, page) { return { results: data }; } } });