PHP Constant tutorial with practicle example

PHP Constant tutorial with practicle example

Constant: Constant refers to fixed value that does not change the value
during the execution of program. Constant are defined using PHP’s
define () function which accept two arguments. The $ prefixed is not
required for constant.A simple Example :

//define constant
//use constant
echo “Area of circle=”.$area;


Result – 78.5

Practical example:
This script is used for data base connection.


Leave a Reply

Your email address will not be published. Required fields are marked *

Do you have any Query / Suggestion