PHP lecture 03
PHP Array Functions
PHP Array Functions overview.
count() - return the number of elements of an array.
sort() - sort arrays in ascending order.
For Loop
4.18.24 Movement Legacies, Reflection, and Review.pptx
Arrays PHP 03
1. PHP Course
3: Arrays
An array stores multiple values in one single
variable
PHP Course Info@ITBigDig.com
2. Instructor
Name: Mohamed Saad.
Email: Engsaad_aly@hotmail.com
Occupation: Web Developer In IT Big Dig.
PHP Course Info@ITBigDig.com
3. Contents
• PHP Array Functions
o PHP Array Functions overview.
o count() - return the number of elements of an array.
o sort() - sort arrays in ascending order.
• For Loop
PHP Course Info@ITBigDig.com
4. PHP Array Functions overview
o count() - return the number of elements of an array.
o sort() - sort arrays in ascending order.
o rsort() - sort arrays in descending order.
o asort() - sort associative arrays in ascending order, according
to the value.
o ksort() - sort associative arrays in ascending order, according
to the key.
o arsort() - sort associative arrays in descending
order, according to the value.
o krsort() - sort associative arrays in descending
order, according to the key.
5. PHP Array
• There are three types of arrays:
•Arrays with numeric indexIndexed arrays
•Arrays with named keysAssociative arrays
•Arrays containing one or more arraysMultidimensional
arrays