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

Which cryptographic extension provide generation and verification of digital signatures?

906


How send email using php?

929


Explain what does the function get_magic_quotes_gpc() means?

887


What's the best method for sanitizing user input with php?

880


What is a trait in php?

980


What is the use of array_count_values() in php?

992


What is the Pipe Symbol represented?

1033


What is the use of php and mysql?

974


How to create database connection and query in php?

986


What is warning – “cannot modify header information – headers already sent”?

1026


What is the difference between file_get_contents() and file_put_contents() in php?

1122


How to genrate report in wordpress cms

2256


How to generate a form?

1113


What are the three parts of an http request?

929


What software is required for php?

999