<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
</head>
<body>
<?php
$age=12;
echo($age>=9)? "it is a adult" : "it is a child";
?>
</body>
</html>
這和c裏面的三元運算符是一樣的