What is the Diff. Between echo() and Print() in PHP?
Answer Posted / ashish zarkar
echo is statement and print is function
echo evaluate the string before send the output just like this
$a=10
echo "Value is $a"
output:- Value is 10
print 'Value is $a'
output:- Value is $a
print does not evaluate the stirng but echo does and one
thing more echo is faster then print because echo does't
return any value just given the output
| Is This Answer Correct ? | 13 Yes | 47 No |
Post New Answer View All Answers
How do I update php?
How long should a session last?
Is php good for career?
What is default session time in php?
What is xss in php?
How do you define a constant in php?
Can php use gettext?
How to select a database in php?
What is the difference between explode () and split () functions in php?
Tell me how would you declare a function that receives one parameter name hello?
How are sessions maintained?
Can you explain, when to use if-else if-else over switch statements?
What is polymorphism php?
What are the variables in php?
Define anonymous classes in php7?