Define statement : Define Constant « Language Basics « PHP






Define statement

<?php
   define("PI", 3.141592);
print "The value of pi is ".PI.".<br />";
$pi2 = 2 * PI;
print "Pi doubled equals $pi2.";

?>

           
       








Related examples in the same category