PHP / Script Language code


What is “PHP”.

PHP is a programming language for dynamically built web sites, is script language that can be used for creating HTLM page on server before the page filled with dynamic content is sent to client. This method of generating the content allows client to see HTML code only. Client is not able to see code (script) which generated the content.

To be able to develop applications it is necessary to have installed php, built web server and installed a database like “mySQL” on the computer. But they are easy to get besides that may be free because there are web server packages ready for usage that allow us to install everything we need for development of PHP applications on the local computer very simply.

One of the main advantages of the PHP language is the option of embedding PHP code directly into HTML pages.

Basic PHP syntax.php-logo

The default syntax for defining code that is written using the PHP language:  


                                                                                                        echo “First Patricia’s  PHP code!!!“;


All that lines between the tags  (end php code) will be treated as a PHP code and they must be stuck in the “body” of the HTML page and will be affected also by CSS.

Brief History

PHP appeared in the mid-nineties to becoming one of the most prominent languages powering the web and since then has continued to grow rapidly.

A NETCRAFT survey from January 2013 shows that PHP is used on 244 million websites. That is a total of 39% of all servers monitored.

How PHP can be applied to a website.

PHP can be used on all major operating systems,

including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS X, RISC OS, and probably others.


With PHP you are not limited to output HTML. PHP’s abilities includes outputting images, PDF files and even Flash movies (using libswf and Ming) generated on the fly.

You can also output easily any text, such as XHTML and any other XML file. PHP can autogenerate these files, and save them in the file system, instead of printing it out, forming a server-side cache for your dynamic content.

One of the strongest and most significant features in PHP is its support for a wide range of databases.

Writing a database-enabled web page is incredibly simple using one of the database specific extensions (e.g., for mysql), or using an abstraction layer like PDO (PHP Data Objects), or connect to any database supporting the Open Database Connection standard via the ODBC extension (Open Database Connectivity). Other databases may utilize cURL or sockets, like CouchDB.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s