Exist some simple function for count only the integer keys of an array?
for example i have this array:
0 => "string"
1 => "string"
"#aaa" => "string"
I need count only the first two element without using a custom foreach loop.
To count the integer keys, try
|
|||
|
Do a check on each key to loop through only the numbered keys:
|
|||||||||
|
Here's a simple solution:
|
|||
|
is_int()
– Dagon 2 days ago