Remove Duplicate values from an Array in PHP

The array_unique() method is used to remove repeated or duplicate values from the array and return an array.

It is better to use this method on the array if there is some possibility of the same values or the later code in the program depends on it for example – selecting records based on ids and displaying them on the screen.

In this tutorial, I show how you can remove duplicate values from –

  • An Indexed,
  • Associative array and
  • Remove index by key name in the associative array.

Remove Duplicate values from an Array in PHP

Read more

Connect with Multiple Databases in CodeIgniter 3

A database is one of the common requirements while building a dynamic application. It uses to store related data in an organized manner.

You can use more than one database in your application.

If you are using CodeIgniter Framework then you need to define the database connection details separately for multiple databases and load it explicitly for performing operations on the database.

Connect with Multiple Databases in CodeIgniter 3

Read more