Difference between count() and sizeof() in php

Both count() and sizeof() returns number of elements in an array.

sizeof() is an alias of count().

<?php
  $arrray1 = array("ele1","ele2","ele3");
  echo "using sizeof function ".sizeof($array1);
  echo "using count function ".count($array1);

?>

Published by deeps blog

Programmer

Leave a comment

Design a site like this with WordPress.com
Get started