Can we create html codes with php?
I heard today that one of my friends talking where we can create HTML code within PHP.
Is this possible?
I heard today that one of my friends talking where we can create HTML code within PHP.
Is this possible?
Hello Ryan.
Use PHP echo.
echo outputs strings. Â If an HTML tag is used, it will output the string as HTML.
Below is the link to the PHP function (or language construct) echo :Â http://it.php.net/manual/en/function.echo.php
It is one of the most basic functions in PHP which outputs strings. Â It also support HTML tags. Â
All you have to do is to enclose the string that you want to display and include HTML tags.
This is an example of using echo to output HTML:
<?php
Echo "<html>";
 Echo "<title>Using echo to output HTML in PHP</title>";
 Echo "Example of HTML bold tag</b>";
?>
The tags "<title>" and "" will be interpreted as HTML. Â Try it out.
Hope this helps!