Question

Give different ways for output statements in php"

Give different ways for output statements in php"

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In PHP we can get output by two basic ways. They are 1.echo 2.print
1.echo
It can accept multiple expressions.
It can pass multiple string separated as (,).
echo is faster then print.It doesnt return any value.
In PHP, echo is not a function but a language construct
Syntax:
void echo ( string $arg1 [, string $... ] )

2.print
It cannot accept multiple expressions.print only takes one parameter
It cannot pass multiple arguments.
It always returns the value 1.
In PHP, print is not a really function but a language construct. However,it behaves like a function in that it returns a value.
Syntax:
int print ( string $arg )

Add a comment
Know the answer?
Add Answer to:
Give different ways for output statements in php"
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT