How to HTML tags in PHP echo?
Example 1: This example demonstrates that how HTML tags can be used inĀ PHP echo to display the result.
<<<GFG
// HTML Markup
GFG;
1 2 3 4 5 6 |
<?php echo <<<GFG <h1>T4Tutorials</h1> <p>I am in heredoc with identifier 'GFG' .</p> GFG; ?> |
Example 3: How PHP echo in HTML tables using database MySQL and Mysqli table?
1 2 3 4 5 |
<table border 1px> <center><h3>Welcome: <?php echo "<tr><td>".$row['name']."</td></tr>"; ?> </h3></center> <center><h3>Welcome: <?php echo "<tr><td>".$row['Email']."</td></tr>"; ?> </h3></center> </table> |