Menu
×
×
Correct!

Exercise:

Here you see an associative array. Output "age" of Ben.

$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43"); echo "Ben is " . $age['Ben'] . " years old.";
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43"); echo "Ben is " . $age["Ben"] . " years old.";

Not Correct

Click here to try again.

Correct!

Next ❯
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
echo "Ben is " .  . " years old.";

  
  
  




Go to w3schools.com
Reset Score
Close This Menu

Completed 0 of 47 Exercises:

PHP Syntax
PHP Variables
PHP Strings
PHP Operators
PHP If...Else
PHP Switch
PHP Loops
PHP Functions
PHP Arrays
PHP Forms
PHP Dates
PHP Advanced





×

Reset the Score?

This will reset the score of ALL 47 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 47 PHP exercises.

Share your score on facebook: