Mega Code Archive

 
Categories / Php / Functions
 

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>';  ?>