Constants in PHP

Filed in php-lesson1(variables) 0 comments

PHP offers constants which their value will not be reassigned regardless of ehat variables do so their value will be consistent.
Constants definitions: Constants do not have $ before their name and by convention they will be named with upercase letters.Constants have global scope which can be accessible within the function or even any where in your scripts after that they defined.
Example:

define(MYNAME, "Jhon");

No related posts.

Posted by voshka   @   4 March 2010 0 comments

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Previous Post
«
Next Post
»
CrossBlock designed by DeltaManual.Com  |  In conjunction with Web Hosting   |   Web Hosting   |   Reverse phone