Mix variable with string output : print « Utility Function « PHP
- PHP
- Utility Function
- print
Mix variable with string output
<?php
$cars = 10;
print "We have $cars cars.\n<br>";
print "We got another new car.\n<br>";
$cars++;
print "Now we have $cars cars!\n<p>";
print '<b>$cars++</b> is the same to PHP as <b>$cars + 1.</b>';
?>
Related examples in the same category