How to Writing PHP Scripts

Writing PHP scripts always begin with a "smaller (<)" and ending with a "greater (>)" and in writing the PHP script itself, there are four different ways, namely:

<?

PHP Scripts

?>

<?php

PHP Scripts

?>

<script Language="php">

PHP Scripts

</ SCRIPT>

<%

PHP Scripts

%>

Of the four ways before, you can choose which one to use in writing the PHP script but more often used is the way the first and second. In addition, the note is at the end of every PHP script should end with a "semicolon (;)".

Here is an example of writing from the PHP script:



<?php

echo ("Congratulations Learning PHP here");

?>
Previous
Next Post »