If you want to print the html tags and code inside the PHP code you can do it by putting all the html code inside the echo syntax:-
Consider the following two cases:-
1. In between PHP tags
<?php if(condition){ ?> //In this case the html code is written between the PHP code.
<!-- html code --> <input type="text">
<?php } ?>
2. In an echo
if(condition){//in this condition you can put all of your html code inside the echo "" syntax.
echo "<input type="text">"; //html code
}
0 Comment(s)