Genius way for easy installation and Know of PHP syntax and Comment.
Installation (requirements and How to install)
To start using (coding) PHP For the first and most common form, you need three things:
a web server
a web browser
SETUP PHP: Hypertext Preprocessor ON YOUR COMPUTER
You probably already have a web browser, and depending on your operating system setup, you may also have a web server (e.g. Apache on Linux and macOS; IIS on Windows).
For PHP Installation support visit http://php.net/manual/en/install.php the Official website of PHP
SETUP PHP: Hypertext Preprocessor ON HOSTED WEBSPACE
You may also rent webspace at a company. This way, you don’t need to set up anything on your own, only write your PHP scripts, upload it to the server you rent, and see the results in your browser.
WHAT IS PHP PARSER
Software that converts source code into something more easily (and more efficiently) understandable by a computer.
When PHP parses a file, it looks for opening and closing tags, which are 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.
If a file contains only PHP code, it is preferable to omit the PHP closing tag at the end of the file.
Php file have extension “.php”
HOW PHP BASIC CODING LOOKS
Below shows #1 example of basic PHP CODES
This will also be ignored by PHP and displayed by the browser.
The above example escapes from HTML as explained
Example #3 Advanced escaping using conditions
This will show if the expression is true.
Otherwise this will show.
In this example PHP will skip the blocks where the condition is not met, even though they are outside of the PHP open/close tags; PHP skips them according to the condition since the PHP interpreter will jump over blocks contained within a condition that is not met.
The closing tag of a block of PHP code automatically implies a semicolon;
you do not need to have a semicolon terminating the last line of a PHP block.
The closing tag for the block will include the immediately trailing newline if one is present.
EXAMPLE #4 Instruction separation of PHP tag
PHP supports ‘C’, ‘C++’ and Unix shell-style (Perl style) comments. As show in the example above.