Moh*_*mad 5 php arrays key count
Array
(
[0] => 'hello'
[1] => 'there'
[2] =>
[3] =>
[4] => 3
)
// how to get the number 5?
Run Code Online (Sandbox Code Playgroud)
tee*_*one 21
$arr = Array
(
0 => 'hello',
1 => 'there',
2 => null,
3 => null,
4 => 3,
);
var_dump(count($arr));
Run Code Online (Sandbox Code Playgroud)
输出:
INT(5)