-1
単純なif ... else文を実行しようとしています。当初、次のように指定されました:単純なif ... else文が必要です。
<?php
$IntVariable = 75;
($IntVariable > 100) ? $Result = '$IntVariable is
greater than 100'
: $Result = '$IntVariable is less than or equal
to 100';
echo "<p>$Result</p>";
?>
if ... elseステートメントに変更する必要があります。これまでのところ、私が書いた:
<?php
$IntVariable = 75;
if ($IntVariable > 100) {
$Result = '$IntVariable is greater than 100';
}
else {
$Result = '$IntVariable is less than or equal to 100';
}
else {
echo "<p>$Result</p>";
}
?>
私はPHPには本当に新しいですあなたが持っている場合ので、私はecho $result
に再び本当に簡単...
2つのelse文があります。 – RSon1234
多くのelse文を使用する場合は、elseifを使用する必要があります – fizzi