Determining the amount of elements in an array.
JavaScript
var haystack = ['fish', 'needle'] console.log(haystack.length);
PHP
print count(['fish', 'needle']);
See also
- strlen - Determining the amount of characters in a string
Determining the amount of elements in an array.
var haystack = ['fish', 'needle'] console.log(haystack.length);
print count(['fish', 'needle']);