PHP Programing language

How Can Define Constant in Function
Previous Home Next
<html>
<head>
<title>	define constant ina function</title>
</head>
<body>
<?php

define('CO1', 1);

function MyTest() {
  define('CO2', 2);
}

MyTest();
echo "CO1 = " . CO1 . " and CO2 = " . CO2 . "\n";
?>
  
</body>
</html>

 

Output:

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: