How to Get Array Length in PHP?

Nov 04, 2022

.

Admin

How to Get Array Length in PHP?

Hi Dev,

Today, I will let you know an example of how to get array length in PHP. I would like to share with you how to get PHP array length. you will learn how to check array size PHP. I would like to show you how to check PHP array size. Follow below tutorial step of how to check PHP array length.

In this post, we will learn how to check array length in PHP. you can understand the concept of how to get PHP array length. you can see how to check array size PHP. you will learn how to check PHP array size.

Example :


index.php

<?php

$fruits = array("Apple","Orange","Mango");

echo count($fruits);

?>

Output:

3

I hope it could help you...

#PHP