Tag Archives: sort

PHP: How to sort multi-dimentional arrays

Hello friends, Here we will discuss about sorting multi-dimentional arrays in PHP.

To sort the above array by ascending/descending order of user_id

To sort the above array by ascending/descending order of name

But, here we can see that usort() function sorts by values and does not maintain the keys. The solution is… Read More »

Zend Framework 2 – Ajax Pagination and Records Sorting

In any application, record listing with pagination and sorting is very common thing. ZF2 also provides support for pagination. Lets start with an example to understand the concept more clearly. Step 1: Create a database table countries and states

Step 2: Now create database configuration

Step 3: Lets create a new module “Sample”… Read More »

Zend Framework 2 – Pagination and Records Sorting

In any application, record listing with pagination and sorting is very common thing. ZF2 also provides support for pagination. Lets start with an example to understand the concept more clearly. Step 1: Create a database table countries and states

Step 2: Now create database configuration

Step 3: Lets create a new module “Sample”… Read More »