This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Arrays

Associative Arrays part 1

Peter is 35 years old.

<?php
// define associative array $age() with the values of three objects
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");

// display Peter's age
echo "Peter is " . $age['Peter'] . " years old.";
?>