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 a php object?
What is a substring in php?
How do you display the output directly to the browser?
How to register a variable in PHP session?
What is difference Between PHP 5 and 7?
Why should I learn php?
What is a composer in PHP?
Tell me what is the default session time in php?
What is difference between single quotes and double quotes in php?
Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
Write a program to display reverse of any number?
What is the use of offset in mysql?
What does PEAR stands for?
What is trim codeigniter?
What are the string functions in php?