What is count_array() function and what it's work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is count_array() function and what it's work

16th Nov 2019, 2:26 PM
Ahmad
Ahmad - avatar
4 Answers
+ 1
Show me the code where you saw this function?
16th Nov 2019, 3:26 PM
Ipang
+ 1
// It's a count() it's a PHP function to count number of elements in array for example: $user = array ("a", "b", "c", "d"); echo count($user); #output 4 #because $user array has 4 elements in it
16th Nov 2019, 4:59 PM
Sudarshan Rai
Sudarshan Rai - avatar
0
Sorry. I wrote it wrong The correct is count($array)
16th Nov 2019, 4:54 PM
Ahmad
Ahmad - avatar
0
Thank you. but if the $array is a variable what is this function's work
16th Nov 2019, 5:05 PM
Ahmad
Ahmad - avatar