Course 1: How to win friends & develop in PHP
Arrays Level 2: Associative Arrays
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 2 / 2

Let's look at this code block:

$animals = array('cat', 'dog', 'hamster');
// let's add a new animal!
$animals[2] = 'elephant';

echo count($animals);

What will this print?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.