Notes for You:: How to create HTML table in PHP – PHP Tutorial 12
– Indenting the code properly will increase readability, understandability and modifiability of the code.
Example code:
<?php
echo “<table border=’0′ width=’300′ cellspacing=’0′>”;
echo “<tr bgcolor=’orange’>”;
echo “<td>1</td>”;
echo “<td>2</td>”;
echo “<td>3</td>”;
echo “<td>4</td>”;
echo “</tr>”;
echo “<tr bgcolor=’lightgray’>”;
echo “<td>1</td>”;
echo “<td>2</td>”;
echo “<td>3</td>”;
echo “<td>4</td>”;
echo “</tr>”;
echo “<tr bgcolor=’orange’>”;
echo “<td>1</td>”;
echo “<td>2</td>”;
echo “<td>3</td>”;
echo “<td>4</td>”;
echo “</tr>”;
echo “<tr bgcolor=’lightgray’>”;
echo “<td>1</td>”;
echo “<td>2</td>”;
echo “<td>3</td>”;
echo “<td>4</td>”;
echo “</tr>”;
echo “</table>”;
?>
Note:
– replace < with less-than symbol.
– replace > with greater-than symbol.
=========================================
Follow the link for next video:
PHP Tutorial 13 – Character set of PHP language | PHP Character Sets
Follow the link for previous video:
PHP Tutorial 11 – How to use HTML attributes in PHP echo statement
=========================================
PHP Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
MySQL Tutorials Playlist:-
HTML Tutorials Playlist:-
CSS Tutorials Playlist:-
JavaScript Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
https://www.youtube.com/chidrestechtutorials
► Visit our Website:
https://www.chidrestechtutorials.com
=========================================
Hash Tags:-
#ChidresTechTutorials #PHP #PHPTutorial