PHP – Multidimensional Arrays

Multidimensional delays are when you use Arrays as values for Arrays.

<?php

$shirts = array('long sleeve', 't shirt', 'sweater');
$bottoms = array('pants', 'shorts', 'skirt');
$types = array('top' => $shirts, 'bottom' => $bottoms);

print "{$types['top'][2]}";

?>

Be the first to comment

Leave a Reply