Getting Started with PHP
Getting Started with PHP : Home
Hello World
Data Types in PHP
Variables in PHP
Operators in PHP
Decision Making in PHP
Iterations in PHP
Functions in PHP
Arrays in PHP
Strings in PHP
Object Oriented PHP
Classes and Objects
Object Interfaces
Static and Final
Advanced Features in PHP
Session in PHP
Cookies in PHP
Server Variables

PHP -> PHP: Hypertext Preprocessor (recursive acronym)
PHP is an open source server scripting language that is used to create dynamic webpages and interactive websites. PHP runs on web server and is a backend language.
Why PHP?
Owing to its features like free of cost, stability, cross platform compatibility, easy syntax and easy to embed in html , PHP runs on more than one third of total web servers worldwide. If you are planning to create a website which need dynamic web pages then you should definitely go for PHP.
PHP embedded in HTML :
Using canonical tags <?php for starting php code and ?> for terminating php code PHP code can be embedded in HTML

When user requests a page the page is processed by the PHP engine giving a static page i.e. html page as output so the PHP code is not visible to user

<!DOCTYPE html>
	<h1><?php echo “hello world”?></h1>

There you have your first PHP code. The PHP code embedded in HTML will be processed by PHP engine and the user will be sent static html code which will look like this :

<!DOCTYPE html>
 	<h1>hello world</h1>

Login to Track Your Progress