Consider the following code:
<?php
$username = $_POST['username'];
echo 'How can I display a variable inside some html code using the echo in php?';
?>
Consider the following code:
<?php
$username = $_POST['username'];
echo 'How can I display a variable inside some html code using the echo in php?';
?>
You can write php code inside html by using php tags like
<p class='test'><?php echo "test php" ?></p>
<?php
$username = $_POST['username'];
echo 'How can I display a variable '.$username.' inside some html code using the echo in php?';
?>
<i><?php echo $username; ?></i>