+ 6
You are free to choose which one to use, however, there are differences (minor), see the links after the code. <?php $a=10; $b=20; $c=30; // print only accepts one argument, so the // following line will trigger error (unexpected "," on the error message) print $a,$b,$c, "<br />"; // echo accepts multiple arguments, so the // next line will run just fine. echo $a,$b,$c, "<br />"; ?> http://www.differencebetween.info/difference-between-echo-and-print-in-php https://stackoverflow.com/questions/234241/how-are-echo-and-print-different-in-php https://www.quora.com/What-is-the-difference-between-echo-and-print-in-PHP Hth, cmiiw
20th Jan 2018, 4:14 AM
Ipang