Ads by ProfitSence

Find PHP Size of array , length of array , count function

Last Updated on Wednesday 5th Oct 2022
  • Arrays are labeled as a collection of values that are related.
  • They can be data submitted in a specific form like students' names in a class etc...
  • An array has elements in the form of keys and values.

Find Length of Array

  • PHP allows you to count the length of an array with the help of the count() function.

    <title>This is my PHP Script</title>

    <?php Add Here ?>


    <title>This is my PHP Script</title>



PHP Count() Function

$names = array(

echo 'The Count names array :', count($names);


					// The Count names array :8