Computer Knowledge and Tutorials weblog, Computer knowledge, windows, linux, open source, programming, web apps

Another PHP tutorials

To escape php from html, a PHP code block starts with “<?php” and ends with “?>”. A PHP code block can be placed anywhere in the HTML document. You may also use <? ?> but it’s not available on every servers.

To separate instructions, each instruction must end with a semicolon. The PHP closing tag also implies the end of the instruction.

This is an example on how to write PHP between html tags:

<html>

<head>

<title>PHP is fun</title>

</head>

<body>

<?php echo “This text is generated using PHP”; ?>

</body>

</html>

Tags: ,

Google
 

Leave a Reply

192 views