Translate

Monday, May 5, 2014

3. PHP Constant Variables

Constant Variable Variable types we use it if we want to save, no real change.
We use Function define () to create Constant Variable.
Syntax:

<?php
  define(string constant_name,vallue[,1|0]);
?>
1: case sensitive (sensitive or large) 0: case insensitive (not case sensitive)
For example:
<?php
  define("server","localhost",1);
  echo server;  // output : localhost
?>

0 comments:

Post a Comment