Thursday, June 16, 2011

Tutorial 2: Arrays

An associative array, each ID key is associated with a value. These ID keys can be used as a value in your script. For example,
<?php
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";

echo "Peter is " . $ages['Peter'] . " years old.";
?>

This uses the array to show how old peter is. If you have any further questions on arrays feel free to click here