PHP
SWITCH CASE with PHP
HiroDaegu
2022. 1. 1. 23:05
728x90
SMALL


<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WEB</title>
</head>
<style>
* {
text-align: center;
}
</style>
<body>
<h1>SWITCH with PHP</h1>
<br>
<br>
<br>
<br>
<br>
<?php
$num = 100;
switch ($num) {
case(100):
?>
<p>현재 저장된 숫자 : <?=$num?></p>
<?php
break;
case(200):
?>
<p>현재 저장된 숫자: <?=$num?></p>
<?php
break;
default:
?>
<p>현재 저장된 숫자 없음</p>
<?php
break;
}
?>
</body>
</html>728x90
LIST