Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP define a constant.
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
define a constant.
1 Answer(s)      3 years and 10 months ago
Posted in : PHP


How do you define a constant?


Advertisement
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, 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
PHP Constant Function
Constants: We use define() function or const keyword to define a constant... of the constant.   PHP Constant Example: <?php define("pi",3.14... as constants. A resource can be declared as constant but it is not advisable because
Define HibernateTemplate?
Define HibernateTemplate?  Hi, Define HibernateTemplate? Thanks
how to set the value of textfield constant
how to set the value of textfield constant  how to set the value of textfield constant
Define stack
Define stack  hii, Explain stack
Define please!?!
Define please!?!  What is tree map sort
Define Simulation
Define Simulation  hello,, Explain Simulation?   hii, Simulation is the process of forming an abstract model from a real situation in order to understand the impact of modifications and the effect of introducing
Define stack
Define stack  hii, Explain stack?   hello, 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 is deleted First
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
PHP Constant
but the difference between the constant and a variable is value of constant can.../>"; echo "If we would like to print constant within \"... is a constant, we need not to use '$' sign before constant"; ?> Output
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.   Example
php define variable
php define variable  How to define a simple and a global variable in PHP
php define array
php define array  How to define array in PHP
define string variable in php
define string variable in php  how to define string variable in PHP
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 Magic Constant
of the magic constants are as follows: 1) __LINE__: This constant is used to indicate the current line number of the file. 2) __DIR__ :  This constant is used...__ : This constant is used to indicate the full path of the file 4) __CLASS__ : Returns
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... JavaFloatExample { /* Learn How to define and use float variable in Java...); } } Thanks  public class JavaFloatExample { /* Learn How to define
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
Define Tag:
Define Tag:       bean:define Tag - is used to define a scripting variable based on the value(s) of the specified bean... as null. bean:define Tag can't be used  to instantiate a DynaActionForm
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
Displaying Constant values from Interface in JSP - JSP-Servlet
Displaying Constant values from Interface in JSP  Hi, ******Sorry... condition becomes true for eg: there is an interface which contains constant... I am directly using the values instead of the constant variables for displaying
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
import user-define package - Applet
import user-define package  how to import user-define package to the frame/graphic of the applet. could i create a new frame or not ?? please help me ...  Hi friend, import java.io.*; import java.awt.*; import
Facelet define Tag
Facelet define Tag          This tag is used to define the name of the content... this define tag. This name attribute is required to be same as name attribute
How to define variable in Velocity
How to define variable in Velocity       This Example shows you how to define a variable in velocity. Methods used in this example are described below:- 1:- Initialize
Dynamically update the Label & set Bounds constant between 2 Label(Thread)
Dynamically update the Label & set Bounds constant between 2 Label(Thread... extends javax.swing.JFrame { private int q; private String r...=""; private String t2=""; public MyNew3( String t2,String t3,int q
Dynamically update the Label & set Bounds constant between 2 Label(Thread)
Dynamically update the Label & set Bounds constant between 2 Label(Thread... extends javax.swing.JFrame { private int q; private String r...=""; private String t2=""; public MyNew3( String t2,String t3,int q
 

 

 

DMCA.com