Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do you have any Query / Suggestion