PHP - echo and print statement .

Опубликовано: 09 Октябрь 2024
на канале: Student Projects Live
171
2

In PHP, there are two basic ways to get output: echo and print

PHP echo and print statements

echo and print are more or less the same.

They are both used to output data to the screen.

The differences are small:

echo has no return value while print has a return value of 1 so it can be used in expressions.

echo can take multiple parameters while print can take one argument.

echo is marginally faster than print.

The PHP echo statement

The echo statement can be used with or without parenthesis: echo or echo()

For source code kindly refer https://www.studentprojects.live
Do you have Any queries? Contact us in Whatsapp :- +91-9972853368