Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to Define a Constant in PHP? Is $ symbol necessary?

Answer Posted / nilsoft

define("CONSTANT", "Its constant");

echo CONSTANT; // Outputs Its Constant

There is no need to use $ sign for it.
$ sign is used for declare variables.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the ip address of the client?

9169


What are php functions?

1033


What is the purpose of break and continue statement?

961


What is encapsulation in php?

972


How is session data stored?

951


What are the environmental variables?

1013


What is the php function that removes the first element of the array and returns it?

963


What is the use session in php?

1031


What is cookie?

999


How to get length of an array in PHP?

1013


Is php a programming language?

1035


What are include() and require() functions?

950


How do I install php?

1054


What are the methods useful for method overloading?

1016


What is php how it works?

1014