Thứ Ba, 31 tháng 7, 2018

Auto news on Youtube Jul 31 2018

hey guys, welcome back to my channel Ndev tuts.In this tutorial, we will learn

about PHP constants. let's talk about PHP constant. constant are like variables

except that once they are defined they cannot be changed or undefined. a

constant is an identifier or name for a simple value. the value cannot be

changed during the script. a valid constant name starts with a letter or

underscore. no $ sign before the constant name. syntax of PHP constants to

create a constant use the define function. name: specify the name of the

constant. value: specify the value of the constant

case insensitive: specify whether the constant name should be case insensitive

default is false. let's see the example of PHP constant. create a PHP file

constant.php

write a program to calculate area of circle. let's start writing a code

Save the code. let's run the program

the output of the code will be this

Không có nhận xét nào:

Đăng nhận xét