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
• PHP Character Set - PHP Tutorial 13
Follow the link for previous video:
PHP Tutorial 11 - How to use HTML attributes in PHP echo statement
• How to use HTML Attributes in PHP - P...
=========================================
PHP Tutorials Playlist:-
• PHP Tutorials
=========================================
Watch My Other Useful Tutorials:-
MySQL Tutorials Playlist:-
• MySQL Tutorials
HTML Tutorials Playlist:-
• HTML Tutorials
CSS Tutorials Playlist:-
• CSS Tutorials
JavaScript Tutorials Playlist:-
• JavaScript Tutorials
=========================================
► Subscribe to our YouTube channel:
/ chidrestechtutorials
► Visit our Website:
https://www.chidrestechtutorials.com
=========================================
Hash Tags:-
#ChidresTechTutorials #PHP #PHPTutorial