PHP OUTPUT STATEMENTS - PHP LESSON 5 STUDENTSBLOG100 - Anna University Multiple Choice Questions

PHP OUTPUT STATEMENTS - PHP LESSON 5 STUDENTSBLOG100


In this tutorial we are going to discuss about output statements in PHP. In C Programming language the output statement is printf, In C++ Programming language the output statement is cout <<. Like the same in PHP Programming language, the output printing statement is echo. Totally there are two methods to print output in PHP.

Two output statements in  PHP are..
  • Echo
  • Print
Echo:
Used for printing one and more lines in output

Syntax:

Output:
Hello World!
1st string 2nd string 3rd string

Print:
Used for printing one line.. We suggest to use echo statement to print output in php.

Syntax:

Output:
Hello World!

Lesson 4 Previous | Main Page | Next Lesson 6

No comments:

Post a Comment