php syntax

PHP is stand for PHP Hypertext Preprocessor.  It is a recursive acronym; the first "P" stands for "PHP," and the first "P" of that stands for "PHP" as well, thus the cycle continues. PHP is a widely used. PHP is general-purpose scripting language. It was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document.
PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel, cause it is a general-purpose programming language. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as standalone interpreter on most operating systems and computing platforms.
PHP can be edited by standart text editor. But you need another server in order to connect it. You can try appserv. It's easy one, and portable. You can edit your php everywhere, whenever you need it, as long as you bring your appserv with you.
PHP document start with <?php and ended with ?> . Every PHP command ended with ;. we use <?php as start because it's available in all browser. some time may be you'll find <?, but it's not recomended. When PHP parses a file, it looks for opening and closing tags, which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser. Most of the time you will see PHP embedded in HTML documents.
A simple example.
<?php
echo 'hallo';
?>
You will see hallo in your browser if succed

0 Comments:

 

Mhabibie's web | Mhabibie's BLog