This article mainly introduces define usage in php. The example analyzes the usage skills of using define to define constants in php, which has some reference value. If you need it, you can refer to it.
This article mainly introduces define usage in php. The example analyzes the usage skills of using define to define constants in php, which has some reference value. If you need it, you can refer to it.
This example describes define usage in php. Share it with you for your reference. The details are as follows:
<? Php/** define ** // * 3rd parameters: * false -- case sensitive (default) * true -- Case Insensitive **/define ("pai ", 3.14); define ("name", "LiLei", true); function testfor ($ x) {for ($ a = $ x; $ a <= 12; $ a ++) {echo "now $ a point:"; if ($ a <9) {echo "Knock code"; echo name ;} else {echo "sleeping"; echo pai;} echo"
";}} Testfor (10);?>
The running result is as follows:
Now: Sleep 3.14
Now it's: Sleep 3.14
Now it's: Sleep 3.14
I hope this article will help you with php programming.
,