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 csrf mvc?

1041


Write a program to find the factorial of a number in php?

996


Is ruby on rails php?

970


What are traits?

1284


List data types in PHP?

1037


Explain how we can retrieve the data in the result set of mysql using php?

983


Explain mysql_error().

1005


Explain Type hinting in PHP?

1033


Is empty java?

1041


What type of headers have to be added in the mail function to attach a file?

948


Why print_r is used in php?

957


What are the ways to include file in php?

997


Why do you need php?

1004


Do you know how to enable error reporting in php?

993


How to increase the execution time of a PHP script?

1059