What would be the difference between using print
or echo
in PHP, since both print text on the screen.
When is it best to use one?
echo "echo";
print "print";
What would be the difference between using print
or echo
in PHP, since both print text on the screen.
When is it best to use one?
echo "echo";
print "print";
They are very similar. Some differences:
print
echo
void
, so it can not be used in expressions I realize that print
does not exist. I never had to use it as an expression that would be the only reason to use it.