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

Answer Posted / mahesh

A Dollar($) Symbol is not necessary for displaying a
constant6 variable,
ex:
define("PAGE_SIZE","100");
echo PAGE_SIZE;
or
<?=PAGE_SIZE?>

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When a conditional statement is ended with an endif?

522


What is faster?

563


How does csrf attack work?

537


In php, how to redirect from one page to another page?

517


How can you propagate a session id?

541






What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?

520


What percentage of websites use php?

508


What is the difference between substr() and strstr()?

786


What are majic methords in php?

585


What is the purpose of php?

547


What are the functions to be used to get the image's properties (size, width and height)?

550


How check field is empty or not in php?

544


What is a namespace in php?

479


How do I expire a php session after 30 minutes?

542


What is the meaning of a persistent cookie?

563