PHP First Program

After installing PHP successfully on Windows, we learned how to run our first PHP program. Now, we will see another example and learn some more concepts about a PHP program. Our PHP first program will also explain the concepts of programming in PHP, which will further help in working with the PHP program in the upcoming lessons.

PHP program consists of the following tags:

  • <?php = start tag
  • ?> = end tag
  • ; = statements in PHP end with a semi-colon

PHP tags Overview

PHP files’ default extension is .php and a PHP program consists of the following:

  • PHP scripting code
  • HTML tags

Here’s our first PHP program,

As you can see above, the output, Hi, Our first PHP program! will print, since echo is a built-in function that prints text.

PHP First program Output

PHP Installation on localhost
PHP Data types
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading