Subscribe To Our Newsletter

Sign Up Now To Get Free Coupon Codes, Event Coupon Codes Updates, Offers Updates. It's 100% Free!

We Hate Spam! Really, It's terrible and we never do it.

Define Constants in PHP : 6th Day Lecture : Samee


define php constant

Constants In PHP : Samee Articles

Sample 1 : What is Constant in PHP?

Constant is a identifier for a simple value.
The Value can not be changed during the script.
Value starts with letter or underscore, never with dollar sign "$".
It starts with "define."
Constant is default Case Sensitive.

Sample 2 : Constant Example in PHP

My Name is Samee Ullah Feroz.

Sample 3 : Constant Example in PHP

My Nick Name is Sherri Bhai.

 <html>  
   <head>  
     <title>Constants in PHP : 6th Day Lecture : Samee</title>  
     <link rel="icon" type="image/ico" href="http://www.iconarchive.com/download/i50954/deleket/3d-cartoon-vol3/Web-Coding.ico" alt="Icon" />  
     <link type="text/css" href="http://www.getacho.com/download/phpcss/stylesheet.css" rel="stylesheet" />  
     <meta name="robots" value="nofollow, noindex" />  
   </head>  
   <body>  
        <img id="logo" src="http://icons.iconarchive.com/icons/deleket/3d-cartoon-vol3/256/Web-Coding-icon.png" alt="Coding">  
     <h1 align="center">Constants In PHP : <a href="http://sameearticles.blogspot.com" target="_blank">Samee Articles</a></h1>  
       <h2 align="left">Sample 1 : What is Constant in PHP?</h2>  
         <?php  
                          echo 'Constant is a identifier for a simple value. <br /> The Value can not be changed during the script. <br /> Value starts with letter or underscore, never with dollar sign "$". <br /> It starts with "define." <br /> Contant is defauld Case Sansitive.';  
         ?>  
       <h2 align="left">Sample 2 : Constant Example in PHP</h2>  
         <?php  
                          define("name","My Name is Samee Ullah Feroz."); //here it is case sansitive.   
                          echo name;  
                          /*echo Name;*/ //Here is an error due to case sensitivity  
         ?>  
       <h2 align="left">Sample 3 : Constant Example in PHP</h2>  
         <?php  
                          define("name2","My Nick Name is Sherri Bhai.",true); //here it is not case sensitive.   
                          echo Name2; //Here it is not sensitive due to "true" word  
         ?>  
   </body>  
 </html>  


Share this article :

Post a Comment

Give your reviews about this blog. Leave your comments. what do you think about this post?

Meet Samee Ullah Feroz On Google Plus
Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe Samee Articles blog.

---------------------------------------
Thanks for visiting QWC.Me.
==========================================
For free guidelines contact me on SEO Expert | Samee Ullah Feroz is online there.
==========================================
Best Regards

 
Support : | Internet Marketing Specialist And Business Developer
Copyright © 2013-2016. Samee Articles - All Rights Reserved
Proudly powered by Blogger