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

What is string function sql?

937


Is php a middleware?

911


How do sessions work in php?

940


What is the differences between $a != $B and $a !== $B?

993


What is an object in php?

1027


What is alias in php?

986


How cookies are transported from browsers to servers?

893


What is session cookies php?

927


Is variable name casesensitive in php?

931


What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?

898


How to open a file for reading?

969


What is super keyword in c++?

958


What is singleton design pattern in php?

927


What is $_ server request_method == post?

1018


Explain about require and include function?

936