How to use define in PHP

In this article I will explain how define Function can be used in PHP.
  • 1957

define() Function

This function defines a constant.

Syntax

define(name,value,case_insensitive)

Example

<html>
<body>
<?php
define("GREETING","Hello you! what are you doing tomorrow",TRUE);
echo constant("greeting");
?>
</body>
</html>

Output


define-php.jpg

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

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.