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

Answer Posted / vaneet badhan

define(my,60);

echo my;

output will be 60.

define(my,vaneet);

echo my;

output will be vaneet

Is This Answer Correct ?    7 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it easy to learn php?

506


What is difference Between PHP 5 and 7?

510


what does this symbol mean in php?

605


Write a program to find no of days between two dates in php?

511


When do you use define() and when do you use const. What are the main differences between those two?

575






Explain which cryptographic extension provide generation and verification of digital signatures?

523


How to access standard error stream in PHP?

578


What is a php array?

491


How many types of arrays are there in php?

533


Where can I find php ini file?

494


If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?

482


What is polymorphism in oop php?

504


Explain php explode() function.

542


Is php difficult to learn?

503


What is the name of scripting engine in php?

677