Does PHP have a built in function that will allow me to find the size of a 2D array without having to first having to loop through the array and hitting a NULL (C style)
When i say size i mean the number or rows in a 2D array.
many thanks,
Does PHP have a built in function that will allow me to find the size of a 2D array without having to first having to loop through the array and hitting a NULL (C style)
When i say size i mean the number or rows in a 2D array.
many thanks,
have solved my own question:
use sizeof() function.
:)
Dear friend
$value= array(2,5,6,8,9);
echo "size of array = ".sizeof($value)."<br>"; // Output = 5
Thanks and Regards
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.