비전공자 개발일기

PHP with if condition 본문

PHP

PHP with if condition

HiroDaegu 2021. 12. 31. 21:26
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>IF with PHP</h1>
  <?php 

 
  $num = 101;
  if($num == 100) {
  ?>
  100이 보이는 버튼<br>
  <button type="button">100점</button>
  <?php  } else {?>
  100이 아닌 숫자가 보이는 버튼<br>
  <button type="button">NG</button>
  <?php } ?>
</body>
</html>
728x90
LIST

'PHP' 카테고리의 다른 글

WHILE, FOR, FOREACH in PHP  (0) 2022.01.02
SWITCH CASE with PHP  (0) 2022.01.01
PHP with Select Option  (0) 2021.12.30
PHP & jQuery checkbox 활용  (0) 2021.12.29
PHP 5일차  (0) 2021.12.25