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

In PHP, fgets() is used to read a file one line at a time. State Whether True or False?

580


What are the special characters you need to escape in single-quoted stings?

507


What is use of mysqli_query in php?

507


How to get the total number of values in an array?

518


What is symfony php?

524






Is null or empty c#?

506


List some array functions in php?

502


What are getters and setters php?

539


How many columns can be added in a table in mysql?

493


What are the main error types in php and how do they differ?

826


How can we change the maximum size of the files to be uploaded?

506


How can we submit a form without using submit buttons?

531


Why do we use inheritance in php?

526


What are the different ways to login to a remote server?

477


How do I stop php artisan serve in windows?

497