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
Which function would you use to insert a record into a database in php?
What type of operation is needed when passing values through a form or an url?
What are the advantages of indexes in php?
What type of language is php?
What is the function file_get_contents() useful for?
Is php easy language to learn?
Why do we use php?
Why php 7 is faster?
How does html form submit work?
How we can declare variable in php?
What is binary safe string?
Can you extend a final defined class?
What is $_ server request_method == post?
What is smarty?
How to calculate the length of a string?