Colspan and Rowspan:: Example Mysql Table
Colspan and Rowspan:: Example Mysql Table
php
// This won't work because of the quotes around specialH5!
echo "<h5 class="specialH5">I love using PHP!</h5>";
<table border="1">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr><td rowspan="2">Row 1 Cell 1</td>
<td>Row 1 Cell 2</td><td>Row 1 Cell 3</td></tr>
<tr><td>Row 2 Cell 2</td><td>Row 2 Cell 3</td></tr>
<tr><td colspan="3">Row 3 Cell 1</td></tr>
</table>
Row 3 Cell 1
Timmy Mellowman 23
Sandy Smith 21
Bobby Wallace 15
<?php
// Make a MySQL Connection
while($row = mysql_fetch_array($result)){
echo $row['name']. " - ". $row['age'];
echo "<br />";
}
?>
Display:
Timmy Mellowman - 23
Sandy Smith - 21
Bobby Wallace – 15
<?php
$text = 'This is a test';
echo strlen($text); // 14