Learn Desktop and Web Programming: The basic of PHP programming

Selasa, 27 Desember 2011

The basic of PHP programming

  the discussion this time we will begin to struggle with the PHP programming language, here we will be a lot to learn the basics of PHP programming language that will will be implemented for web applications in the subsequent discussion.

PHP tag  In general, the PHP interpreter will be looking for a PHP tag in one file (web page) Where to find the tag when  PHP (opener), the PHP interpreter began to translatePHP prefix of the tag to find PHP tags (cover). PHP language tag flanking the embeded in a file, PHP script in this tag is translatedby the PHP interpreter. PHP tags are divided into two, namely:
* Tag Viewer: It is a tag where the PHP interpreter will start the translation code. Opening tag can be written in the form


-        <? PhpOr-        <script Language="php">
* Closing Tag: This is a tag where the PHP interpreter terminate translation within a block of code in PHP tags. Closing tag is a pair of tagsOpening, so the closing tag should be adjusted with the opening PHP tag. Form in the PHP closing tag is as follows:


?>or</ Script>
thus writing the correct tag is as follows:<Php ............. ?>     and <script language="php"> .................. </ Script>
although the use of opening and closing tags are allowed beratura tag (not suitable mate), but for continuity and consistency of the author suggest the readers to always use the appropriate tagwith each partner so that the code more readable and understandable.The following are examples of application of writing PHP tags with PHP code didalamnnya.<? php      echo ("tag in PHP");?>
or
<script language="php">echo ("like this also allowed"); </ script>
or
 <script language="php"> echo ("this one can also");<? Php
or
 <? php
echo ("this is fine");</ Script>
The four styles of writing the above code the same - the same is allowed, but the remedy then we only use the tags in accordance with their respective spouses.Let us remember that in a file we can write more than one pair of tags, because PHP is a code or script that can be embedded (embed) in an HTML.
hopefully this article useful to add information and science reader.

| Free Bussines? |

0 Commented:

Posting Komentar