操作方法
<?php echo "<p>Some dynamic output here</p>"; ?> <p>Some static output here</p> <?php echo "I love the summertime."; ?> echo语句是语言结构。
<?php print("<p>I love the summertime.</p>"); ?> <?php $season="summertime"; print("<p>I love the $season.</p>"); ?> print()有返回值。
printf("Bar inventory: %d bottles of tonic water.",100); // 传入二个参数: printf("%d bottles of tonic water cost $%f",100,43.20); 用来格式化数据。
$cost=sprintf("$%.2f",43.2); 不会在浏览器显示。