Re: Varying Results Creating Table
| From: | Hugh Bothwell | Date: | Fri, 24 May 2002 13:36:06 +0000 |
| Subject: | Re: Varying Results Creating Table | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-13964@lists.php.net to get a copy of this message | ||
Try this:
<html>
<head>
<title>PHP Test</title>
<style type='text/css'>
<!--
th {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: 700;
background-color: #ffcc00;
text-align: center;
}
td {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
background-color: #ffffff;
}
.ctr {
text-align: center;
}
-->
</style>
</head>
<body>
<table border='2' cellspacing='0' cellpadding='3'
bordercolor='#C0C0C0'
width='97%' id='AutoNumber2' style='border-collapse: collapse'
bgcolor='#FFFFFF'>
<tr>
<th width='4%'> </th>
<th width='28%'>Name</th>
<th width='13%'>Phone</th>
<th width='29%'>E-mail</th>
<th width='22%'>Department</th>
<th width='4%'> </th>
</tr>
<?php
$row['name'] = "Fred Flintstone";
$row['phone'] = "233-7625";
$row['email'] = 'fredf@bedrock.net';
$row['dept'] = 'Aggragate Extraction';
for ($i = 0; $i < 650; $i++)
echo
"<tr>"
."<td class='ctr'>$i</td>"
."<td>{$row['name']}</td>"
."<td>{$row['phone']}</td>"
."<td><a
href='mailto:{$row['email']}'>{$row['email']}</a></td>"
."<td>{$row['dept']}</td>"
."<td> </td>"
."</tr>";
?>
</table>
</body>
</html>