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 is the alternative structure for control structures?
What does namespace mean in php?
What is namespace in php?
What is a php session?
Where is php code written?
What is the super method?
Which framework is best for php development?
List some string function name in php?
What is inheritance in php? How many types of inheritance supports php?
What are getters and setters and why are they important?
How to convert a character to an ascii value?
What are the types of variables in php?
Do you know what are traits?
What is the difference between nowdoc and heredoc?
What is the purpose of the '.frm' file extension? What do thes file contain?