How to use defined in PHP
In this article I will explain how defined Function can be used in PHP.
defined() Function
This function checks whether a constant exists.
Returns TRUE if the constant exists, or FALSE otherwise.
Syntax
Parameter |
Description |
name |
Required. Specifies the name of the constant to check |
Example
<html>
<body>
<?php
define("GREETING","Hello you! How are you today?");
echo defined("GREETING");
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here