In this short tutorial, we will share the quick and straightforward way to php array check length. This article will give you a simple example of how to find array length in php. you can understand a concept of how to get array length in php. you will learn get php laravel array length. You Can Learn PHP Check If Array Has Duplicate Values
we will use count() function to get array length in php. so, let’s see the simple code of how to get length of array in php.
How to Find Array Length in PHP Example:
index.php
<?php
$array = ['One', 'Two', 'Three', 'Four', 'Five'];
$length = count($array);
var_dump($length);
?>
Output:
int(5)
I hope it can help you…
Pingback: How to Check If a Value Exists in an Array in PHP? – LearnCodingFree