define a constant.

define a constant.

How do you define a constant?

View Answers

December 27, 2010 at 2:58 PM

Hi,

With the help of define() directive, you can create constant in php. And here is how:

<?php 
define('NAME', 'Bharat'); 
?>

Thanks.









Related Tutorials/Questions & Answers:
define a constant.
define a constant.  How do you define a constant?   Hi, With the help of define() directive, you can create constant in php. And here is how: <?php define('NAME', 'Bharat'); ?> Thanks
define a constant in php
define a constant in php   hii, How do you define a constant in php?   hello,ADS_TO_REPLACE_1 we can define a constant in php like this define ("CONST", 50
Advertisements
How do you define a constant?
How do you define a constant?  How do you define a constant in php
How to define a constant variable in Java?
How to define a constant variable in Java?   Hi, How to define a constant variable in Java? thanks   HI, The Constants variables are declared using the final keyword. The values of the constant can't be changed
Define HibernateTemplate?
Define HibernateTemplate?  Hi, Define HibernateTemplate? Thanks
Define stack
Define stack  hii, Explain stack
Define please!?!
Define please!?!  What is tree map sort
Define Simulation
Define Simulation  hello,, Explain Simulation?   hii,ADS_TO_REPLACE_1 Simulation is the process of forming an abstract model from a real situation in order to understand the impact of modifications and the effect
Define stack
Define stack  hii, Explain stack?   hello,ADS_TO_REPLACE_1 Stack is an ordered list in which all the insertions and deletions made at one end called top of the stack. It is referred as LIFO list. Last inserted item
Define hiberanate
Define hiberanate  What is Hibernate?   Hibernate is a pure java ORM (object-relational mapping) and persistence framework that allows you to map POJO (Plain Old Java Obiect) to relational database tablea using(XML
ModuleNotFoundError: No module named 'constant'
ModuleNotFoundError: No module named 'constant'  Hi, My Python... 'constant' How to remove the ModuleNotFoundError: No module named 'constant... to install padas library. You can install constant python with following
ModuleNotFoundError: No module named 'constant'
ModuleNotFoundError: No module named 'constant'  Hi, My Python... 'constant' How to remove the ModuleNotFoundError: No module named 'constant... to install padas library. You can install constant python with following
ModuleNotFoundError: No module named 'constant'
ModuleNotFoundError: No module named 'constant'  Hi, My Python... 'constant' How to remove the ModuleNotFoundError: No module named 'constant... to install padas library. You can install constant python with following
define string variable in php
define string variable in php  how to define string variable in PHP
php define array
php define array  How to define array in PHP
php define variable
php define variable  How to define a simple and a global variable in PHP
ModuleNotFoundError: No module named 'define'
ModuleNotFoundError: No module named 'define'  Hi, My Python... 'define' How to remove the ModuleNotFoundError: No module named 'define'... to install padas library. You can install define python with following command
ModuleNotFoundError: No module named 'Define_It'
ModuleNotFoundError: No module named 'Define_It'  Hi, My Python... 'Define_It' How to remove the ModuleNotFoundError: No module named 'Define... have to install padas library. You can install Define_It python with following
Define computer software.
Define computer software.  How to define a computer software?   A computer software is a set of instruction that tell the computer what to do
PHP Constant Function
Constants: We use define() function or const keyword to define a constant... of the constant.ADS_TO_REPLACE_1   PHP Constant Example: <?php define("... as constants. A resource can be declared as constant but it is not advisable because
ModuleNotFoundError: No module named 'constant_listener'
ModuleNotFoundError: No module named 'constant_listener'  Hi, My... named 'constant_listener' How to remove the ModuleNotFoundError: No module named 'constant_listener' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'constant-sorrow'
ModuleNotFoundError: No module named 'constant-sorrow'  Hi, My... named 'constant-sorrow' How to remove the ModuleNotFoundError: No module named 'constant-sorrow' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'mih-constant'
ModuleNotFoundError: No module named 'mih-constant'  Hi, My Python... 'mih-constant' How to remove the ModuleNotFoundError: No module named 'mih-constant' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'py-constant'
ModuleNotFoundError: No module named 'py-constant'  Hi, My Python... 'py-constant' How to remove the ModuleNotFoundError: No module named 'py-constant' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'py-constant'
ModuleNotFoundError: No module named 'py-constant'  Hi, My Python... 'py-constant' How to remove the ModuleNotFoundError: No module named 'py-constant' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'py-constant'
ModuleNotFoundError: No module named 'py-constant'  Hi, My Python... 'py-constant' How to remove the ModuleNotFoundError: No module named 'py-constant' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'py-constant'
ModuleNotFoundError: No module named 'py-constant'  Hi, My Python... 'py-constant' How to remove the ModuleNotFoundError: No module named 'py-constant' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'constant_listener'
ModuleNotFoundError: No module named 'constant_listener'  Hi, My... named 'constant_listener' How to remove the ModuleNotFoundError: No module named 'constant_listener' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'constant-sorrow'
ModuleNotFoundError: No module named 'constant-sorrow'  Hi, My... named 'constant-sorrow' How to remove the ModuleNotFoundError: No module named 'constant-sorrow' error? Thanks   Hi, In your python
user define exception programs
user define exception programs  user define exception programs   Please visit the following links: http://www.roseindia.net/java/java-exception/user-defined-exception.shtml http://www.roseindia.net/java/exceptions
Define float in Java
Define float in Java  Hi, What is the correct method to define.... public class JavaFloatExample { /* Learn How to define and use float variable... How to define and use float variable in Java */ public static void main
how to set the value of textfield constant
how to set the value of textfield constant  how to set the value of textfield constant
objective c define float
objective c define float  Hi, How to define float variable in objective c? Thanks   Hi, Here is the example of defining float variable. float i; i=10; Thanks   Hi, Here is another example: // File
When will you define a method as static?
When will you define a method as static?  Hi, When will you define a method as static? thanks
Define Tag:
Define Tag:       bean:define Tag - is used to define a scripting variable based on the value(s) of the specified bean... be defined as null. bean:define Tag can't be used  to instantiate
how to define variable in node js
how to define variable in node js  Hi, I want to know the correct way to define variable in node js. how to define variable in node js? Thanks   Hi, Node js is nothing but server-side JavaScript. You can define
how to define variable in node js
how to define variable in node js  Hi, I want to know the correct way to define variable in node js. how to define variable in node js? Thanks   Hi, Node js is nothing but server-side JavaScript. You can define
PHP Constant
but the difference between the constant and a variable is value of constant can...."<br/>"; echo "If we would like to print constant... echo "Since pi is a constant, we need not to use '$' sign before
ModuleNotFoundError: No module named 'constant-contact-python'
ModuleNotFoundError: No module named 'constant-contact-python'  Hi...: No module named 'constant-contact-python' How to remove the ModuleNotFoundError: No module named 'constant-contact-python' error? Thanks   
ModuleNotFoundError: No module named 'djangorestframework-constant-field'
ModuleNotFoundError: No module named 'djangorestframework-constant-field' ...: ModuleNotFoundError: No module named 'djangorestframework-constant-field' How to remove the ModuleNotFoundError: No module named 'djangorestframework-constant-field
ModuleNotFoundError: No module named 'constant-contact-python'
ModuleNotFoundError: No module named 'constant-contact-python'  Hi...: No module named 'constant-contact-python' How to remove the ModuleNotFoundError: No module named 'constant-contact-python' error? Thanks   
ModuleNotFoundError: No module named 'constant_time_compare'
ModuleNotFoundError: No module named 'constant_time_compare'  Hi...: No module named 'constant_time_compare' How to remove the ModuleNotFoundError: No module named 'constant_time_compare' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-constant-contact'
ModuleNotFoundError: No module named 'django-constant-contact'  Hi...: No module named 'django-constant-contact' How to remove the ModuleNotFoundError: No module named 'django-constant-contact' error? Thanks   
ModuleNotFoundError: No module named 'django-redis-constant'
ModuleNotFoundError: No module named 'django-redis-constant'  Hi...: No module named 'django-redis-constant' How to remove the ModuleNotFoundError: No module named 'django-redis-constant' error? Thanks   Hi
ModuleNotFoundError: No module named 'djangorestframework-constant-field'
ModuleNotFoundError: No module named 'djangorestframework-constant-field' ...: ModuleNotFoundError: No module named 'djangorestframework-constant-field' How to remove the ModuleNotFoundError: No module named 'djangorestframework-constant-field
Version of commons-jelly-tags-define>commons-jelly-tags-define dependency
List of Version of commons-jelly-tags-define>commons-jelly-tags-define dependency
Version of cn.featherfly>featherfly-constant-core dependency
List of Version of cn.featherfly>featherfly-constant-core dependency
Version of cn.featherfly>featherfly-constant-spring dependency
List of Version of cn.featherfly>featherfly-constant-spring dependency
PHP Class Constant
PHP Class Constants: Sometimes we need to have constant values  in our... before the constant to use or to declare it. The value of the constant should remain unchanged that means it must be a constant expression. ADS_TO_REPLACE_1
Define the session factory interface in hibernate?
Define the session factory interface in hibernate?  Define the session factory interface in hibernate?   Session factory is used for manageing the session objects.public interface SessionFactory extends Referenceable

Ads