1.

What is the different between count() and sizeof() in php?

Answer»

Both are used to count elements in a array.sizeof() function is an alias of count() function used in PHP. count() function is FASTER and BUTTER than sizeof().

ALSO Read: Basic Knowledge of PHP which helps in cracking InterviewExample

$array = array('1','2','3','4');
$size = count($array);

//OUTPUT : 4



Discussion

No Comment Found