PHP Example 2
This program illustrates the use of a PHP array,
an HTML list, and an HTML table.
Here are several hello messages written as text
";
$v = 0;
while($v < count($NAMES)){
echo $myvar . $NAMES[$v] . "
";
$v++;
}
?>
Here are the names written as a list";
echo "";
$v = 0;
while($v < count($NAMES)){
echo "- " . $NAMES[$v] . "
";
$v++;
}
echo "
";
?>
Here are the names formatted as a table";
echo "";
$v = 0;
while($v < count($NAMES)){
echo "";
echo "| " . $v . " | ";
echo "" . $NAMES[$v] . " | ";
echo "
";
$v++;
}
echo "
";
?>