以下是一个使用PHP中的判断语句的实例,我们将通过几个简单的例子来展示如何使用if、if-else和switch语句。

实例1:使用if语句判断奇偶数

```php

$number = 7;

if ($number % 2 == 0) {

echo "