PHP - Arrays
What will be the output of this PHP code?
$items = ['first' => 'a', 'second' => 'b', 'third' => 'c', 'fourth' => 'd']; echo count($items);
$items = ['first' => 'a', 'second' => 'b', 'third' => 'c', 'fourth' => 'd']; echo count($items);
$items has 4 key-value pairs.count($items) returns the total number of elements, which is 4.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions