ShareThis

Wednesday, June 13, 2012

Array Length PHP

To find the array length in PHP, you can use


count()

or


They are the same thing.

Example:

<?php
  $array = array();
  $array[0] = 1;
  $array[1] = 2;
  $size = count($array);
?>

0 comments:

Post a Comment