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

Answer Posted / dhir

Constant means a unchangeable value and in php we are
written in "".

"constant";

And don't need to $ sign.

Is This Answer Correct ?    16 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to count all the lines of code in a directory and sub folder?

518


What is basic php?

546


Will react hooks replace redux?

513


Tell me how to initiate a session in php?

551


What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?

622






What are the string functions in php?

526


Differences between get, post and request methods ?

499


Explain about PHP filter and why it should be used?

559


Is array function in php?

535


How can I prevent sql-injection in php?

594


How to define a function with any number of arguments?

572


What does php exit do?

537


What is the use of trim function in php?

527


How can I use single quotes in single quotes in php?

465


What is strlen function in php?

518