关于代码分号结尾问题
<?php
$p = "";//定义圆周率的两种取值;
define("PI1",3.14);//定义变量PI变为常量3.14;
define("PI2",3.142);
$height = "中";//定义值得精度;
if($height == "中"){$p = "PI1";}
else if($height == "低"){$p = "PI2";}
$r = 1;
$area = constant($p)*$r*$r;
echo $area
?>
if($height == "中"){$p = "PI1";}
else if($height == "低"){$p = "PI2";}
为什么分号要再中括号里面打。而不是外面,不是以分号结尾吗