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

40 lines
624 B
PHP
Raw Normal View History

2010-12-29 04:34:50 +00:00
<?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"
);
2010-12-29 04:38:54 +00:00
?>
<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>