Generic filters
Exact matches only

Sort Arrays

25th August 2014

Php - Arrays

php codehaven

Use these to Order your Arrays: –

sort() – sort arrays in ascending order
rsort() – sort arrays in descending order
asort() – sort associative arrays in ascending order, according to the value
ksort() – sort associative arrays in ascending order, according to the key
arsort() – sort associative arrays in descending order, according to the value
krsort() – sort associative arrays in descending order, according to the key

Remove empty Arrays

This will get rid of empty array data.

Unique – Distinct (No duplicates)

Count

Take off last element in array

Javascript version

Count how many in array

Was this code snippet helpful?