Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array sort by key value

To PHP sort array by key, you should use: 
	ksort() (for ascending order) or krsort() (for descending order). 
      
To PHP sort array by value, you will need functions:
	asort() and arsort() (for ascending and descending orders).
Source by www.bitdegree.org #
 
PREVIOUS NEXT
Tagged: #php #array #sort #key
ADD COMMENT
Topic
Name
8+7 =