Skip to content

PHP code snippet – How to count array?

$array = ['x', 'y', 'z'];
count($array); // output 3
size_of($array); // output 3
See also  Python code snippet - How to save a object in a file?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.