PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

What is a constant in PHP?


The definition of a constant is probably constant everywhere.

It is a specific data type and it retains the value you give it initially through your whole script.

Obviously this is very different to a variable whose value can, and often does, vary throughout the script.

To see how to create a constant, view the question on how to define a constant in PHP.

Note that you may routinely access constants in your use of PHP but not realise it, e.g. PHP_VERSION tells you the version of PHP running.

Comment on this Question and Answer >>>

ASK A QUESTION

More other PHP Questions

How do I define a constant in PHP?

What does the @ character do in PHP?

Can I include Javascript in my PHP code?

How do I access or format the date?

Can PHP create PDF files for me?



Custom Search