PHP endif Keyword

PHP preg_filter() Function
PHP for Keyword

In this article, you will learn about endif keyword in PHP. The endif keyword in PHP is used to mark the end of an if conditional which was started with the if(…): syntax. It also applies to any variation of the if conditional, such as if…elseif and if…else.

examples of the ENDIF keyword

Example 1. In this example, we end an if conditional.

<?php
$a = 4;
if($a < 5):
  echo "Less than five";
endif;
?>
PHP preg_filter() Function
PHP for Keyword
en English
X
Scroll to Top