box-o-sand/PracticingPhp/web/html/wikipedia-tutorial/arrays.php

40 lines
624 B
PHP

<?php
$array = array(
"name"=>"Toyota",
"type"=>"Celica",
"color"=>"black",
"manufactured"=>"1991"
);
$array2 = array(
"Toyota",
"Celica",
"black",
"1991"
);
$array3 = array(
"name"=>"Toyota",
"Celica",
"color"=>"black",
"1991"
);
?>
<dl>
<dt>Manufacturer</dt>
<dd><?php print $array['name']; ?><dd>
<dt>Brand</dt>
<dd><?php print $array2['1']; ?></dd>
<dt>Color</dt>
<dd><?php print $array3['color']; ?></dd>
<dt>Year Manufactured</dt>
<dd><?php print $array3[1]; ?></dd>
</dl>