Code Block Containing Multiple print() Statements : print « Utility Function « PHP






Code Block Containing Multiple print() Statements

 
<html>
<head><title>A Code Block Containing Multiple print() statements</title></head>
<body>
<div>
<?php
$display_prices = true;

if ( $display_prices ) {
  print "<table>";
  print "<tr><td colspan=\"3\">";
  print "todays prices in dollars";
  print "</td></tr><tr>";
  print "<td>14</td><td>32</td><td>71</td>";
  print "</tr></table>";
}

?>
</div>
</body>
</html>
  
  








Related examples in the same category

1.Interpolating array element values in double-quoted strings
2.Interpolating array element values with curly braces
3.Using parentheses with these constructs
4.Mix the output of date( ) with a text string to get a natural-looking statement
5.Mix variable with string output
6.Output string value
7.Output value of a variable wit print function
8.Printing a form