1.Apache start

PHP if

2.hello3.php

C:\xampp\htdocs

PHP if

PHP if

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Hello</title>
</head>
<body>
<h1>Calculate</h1>
<?php
$number=12;
if($number % 2 == 0){
    $msg='odd';
} else {
    $msg='even';
}
?>

<p><?= $number . ' is <b> ' . $msg . '</b>'?></p>
</body>
</html>

3.

http://localhost/hello3.php

PHP if

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2023-04-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案