how to use php
snippet in php

how to use php


// Firstly you must have PHP installed & running a web server
// This could be Apache, Nginx, etc...
// Or for quick testing purposes and for the purpose
// of this example, you could run
// PHP's own dev server from a shell
php -S -t your-web-directory-location
// This will start a web server on localhost port 8080
// The -t switch sets the document root, this is where your
// home page, typically index.php will be situated

// very basic index.php example
	echo "Hello, world!";   
// You can now go to a browser and enter
// You will presented with your simple web page
// Hello, world!



PHP is a general-purpose scripting language especially suited to
web development. 
It was originally created by Danish-Canadian programmer 
Rasmus Lerdorf in 1994; 
the PHP reference implementation is now produced by The PHP Group

Implementation language: C (primarily; some components C++)

how do istart writing a php code


<?php             ?>