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
What are the methods of array in java?
What is the difference between associative array and indexed array?
What are traits?
Describe the security vulnerability of PHP?
Does empty check for null?
Write a program to find no of days between two dates in php?
Is php an oop?
What does $_cookie means?
What is slim framework?
Explain soundex() and metaphone().
Do you know what does mvc stand for and what does each component do?
How do I debug php?
What is session in c#?
What is meant by variable variables in php?
Can age be a variable?