Tuesday 12 November 2019

what is PHP Syntax explanation ? full tutorial by PMEARN.NET

what is PHP Syntax explanation ? full tutorial by PMEARN.NET
In the lesson, I showed you the page named web.php by creating the code written in it today.

Friends, any PHP Script starts with <? Php and PHP Script ends with?>. Meaning that whatever code of PHP we write, we write it under these two symbols <? Php?>. If we write a PHP Script outside it, it will not be valid.


The other thing that is most noticeable in PHP is that all the php pages we create have to be saved with the .php extension, if we do not save them with the .php extension, the code written in the page will not be able to run.

Another important thing about PHP is that the way we can see the source code of HTML on your Web Browser, in the same way you cannot see the Source Code of PHP on your Web Browser because PHP is the server side scripting language. And the code of PHP gets executed on the server so its source code is not visible on our browser.

If you want to write some words or sentences in PHP and look on the Web Page, then you have to use echo. echo is a reserved keyword that is used to show a word or sentence on a Web Page.

In the previous part, in the example of the PHP code we saw, we wrote the php code inside <body> </body> but it is not necessary that you write the php code inside <body> </body> You can write PHP code in any part of it. All you have to remember is that whenever you add PHP code to a page, after that save that page with .php extension.

Friends, today we learned some simple but important things about PHP, in the next lesson we will see some more examples of PHP Code.
Share This :
SUBSCRIBE TO OUR NEWSLETTER