Print vs Echo

Print is a PHP function called with an argument.  Echo is a PHP language construct.  Echo is therefore faster, but when you need an actual function call you can use print.  For example this only wotks using print: $MyVariable ? print “True” : print “False”;

Read More

Echo

echo "Some Text<br />"; echo $someVariable . "<br />"; echo "His name is $name and his age is $age"; Multiple Lines echo <<<END Blah blah blah blah blah blah END; Note the END marker must appear at the start of the line with no whitespace Echo the contents of an array print_r($my_array); //or print_r($my_array[0]);  

Read More