echo
- Is a command only.
- Faster than print
- It can print multiple values.
Example:
<?php
echo 1,2,3,4;
echo $name,$email,$phone;
?>
- Is a function.
- It will return true(1) or false(0) or some values.
- It can print only one value.
Example:
<?php
print 1;
print $name;
if(print(1)){
echo "print returned true";
}
?>
No comments:
Post a Comment