I'll explain those with an example.
<html>
<head>
<title>Embedded php</title>
</head>
<body>
<hr />
<h3>Embedded php</h3>
<p>This is a regular HTML paragraph</p>
<?php
echo "<p>This is a php paragraph</p>";
?>
<hr />
</body>
</html>
You can see the text inside the php script and out side it. Text inside the php script (comes with echo statement) handled as a script and rest of the text rendered as regular HTML. We can include any no of php blocks inside the html document like java script and any html tag to embedded the code.
Embedded php
This is a regular HTML paragraphThis is a php paragraph.
No comments:
Post a Comment