PHP Syntax
A PHP Script always start with
A PHP script can be place anywhere in the document. On server with shortland-support, you can start a php sript with
<? And end with
?>. For maximum compatibility, we recommend that you use the standart form (
<?php) rather than the shortland form.
<?php
php file must have a
*.php extension a php file normally contains HTML tags and some php scripting code, below we have an example of a simple php script that send the text
"Hello Friends" back to the browser.
<html>
<body>
<?php
echo "Hello Friends";
?>
</body>
</html>
Output is :
Hello Friends