Constants In PHP


A Constant is same as variables. Unlike the regular variables, who’s value can be changed, a constant’s value can’t be changed in the code

define(constant_name, constant_valuecase_sensitivity(true/false) )


eg:


<?php
define("learing", "Open learning @ ourcoaching.com");
echo learing;
?>

Output:

Open learning @ ourcoaching.com

 



Related Tutorials