Loading XML file data in Select2 with jQuery AJAX and PHP

Autocomplete search makes easier to find an item from the long list of available items.

It displays suggestions based on the typed searched text.

If your data available in XML format then also you can use it for autocomplete searching.

With the use of XPath navigate on XML data node and search the value.

In this tutorial, I am using the select2 plugin for autocomplete data with jQuery AJAX.

Loading XML file data in select2 with jQuery AJAX and PHP


How to Send AJAX request from Plugin in WordPress

Plugin is used to add features to the site without modifying the core code.

While building plugin you can also use AJAX to save the form after submit, retrieve data from MySQL database, file upload, etc.

In the plugin, AJAX is implemented as same as implemented on the theme.

In this tutorial, I show how you can create a custom plugin and send an AJAX request in WordPress.


Call Model method from another Model in CodeIgniter

In CodeIgniter, the Model is used for the Database manipulation – fetch, insert, update, and delete records.

If within the project there are multiple Models are available then it may require to perform the action in a Model which is already created in another Model.

In this case, you can either create a separate function to perform the same action or use the already available method in the Model.

It is possible to reuse the method in the Model from another Model.

Models are loaded in the Model as same as loaded in the Controller using $this->load->model().

In this tutorial, I create 3 Models and call 1st and 2nd Model methods from the 3rd Model.

Call Model method from another Model in CodeIgniter