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

How to call php function from javascript using ajax?

518


Tell me what is the difference between unset() and unlink()?

534


What is php string function?

536


What are the advantages of indexes?

506


What is the use of namespace in php?

553






What does $_env mean?

571


What is the difference between characters 23 and x23?

549


List some string function name in php?

542


Why php is used?

605


What is difference between session_unset and session_destroy?

506


What does a delimiter do in mysql?

533


Explain me what is the meaning of a persistent cookie?

488


What is the use of dual table in mysql?

518


How to get the http request in php?

578


can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.

3071