PHP if Statement

Back to ACP page

Table of Contents

PHP if Statement

The if statement is used to execute some code if a condition is true.

<h2>if Statement</h2> <p>The if statement executes some code if one condition is true.</p> <?php $t = 14; if ($t < 20) { echo "Have a good day!"; } ?>

Example 1

Result View Example

Document

Document in project

You can Download PDF file.

Reference