
- Image via Wikipedia
What is PHP?
If you’ve surfed the Internet recently, you may have already seen PHP during your travels. Although you’ve probably seen it on the Internet, you may not know much about it. PHP, an acronym for PHP Hypertext Preprocessor, is scripting language used for developing web pages. PHP is a powerful open-source scripting language that is both easy to learn and free!
Simply put, PHP is a scripting language that programmers use to design web pages. It works well in Open Source software environments (especially with Linux). Programmers like to use it mainly because it’s fairly easy to use. It has a syntax that is very similar to the popular “C” programming language. PHP currently, PHP has two major versions: PHP 4 and PHP 5. In addition, PHP is currently being developed.
Setting Up Your Environment
Before you begin programming with PHP, you’ll need to set up a development environment on your computer. In the following steps, you’ll use PHP with an Apache Web server running on Linux. However, you can also use PHP with Apache on any operating system.
Learning Syntax
PHP code sits inside a page with the HTML, and consists of plain-text. For example, an HTML page that shows “Hi, my name is Jerry” would be inside an HTML page named filename.php and looks like this:
Bright Hub Article
That is some simple PHP code below:
echo ‘Hi, my name is Jerry;
?>
The code between the is executed as PHP.
You’ll notice some places where the “php” after the question mark is missing. This practice is known as PHP short tags. As a programmer, you should always use full tags (?php) In addition, all PHP statements should end in a semi-colon. However, a semi-colon isn’t required to terminate the last line of a PHP block. The PHP closing tag ?> contains a semi-colon.
The above steps show some basic PHP code. You don’t need to be an experienced programmer to learn PHP. The only prerequisite is a basic understanding of HTML and a willingness to learn.

