Before beginning to working with PHP you have to comprehend what it is the means by which to coordinate. The fundamental distinction amongst HTML and PHP is that PHP is utilized for making the page element and it is the server site scripting language.
In HTML you compose your code then conveyed it and the client will download that page alongside all the code. The program then translates this code and demonstrates the client the page as you made arrangements for it. HTML code goes to the client same as it is and is translated by the program.
Yet, working with PHP is very unique since you don’t download the code in PHP. Do you have to know what happens when a client demand a PHP page? – The code in the asked for a document is prepared by the server then you download the yield of the code (in HTML shape).
The fundamental point of working with PHP is to utilize the handling forces of the server to create the dynamic site pages. This implies in the event that you click page source on a PHP page, you are not ready to see the PHP codes you will see just HTML tag details only. Because of this, you can’t view how a PHP page is made with the assistance of page source option.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<?php $page_title = "Learn Infinity"; ?> <!DOCTYPE html> <html> <head> <title><?php echo $page_title; ?></title> </head> <body> <?php echo "<h1>Embedding or Installing PHP inside HTML page</h1>"; ?> <p>Condition Statement : <?php if(true){ ?> <b>True</b> <?php }else{ ?> <b>False</b> <?php } ?> </p> </body> </html> |