Tuesday, June 26, 2012

PHP Learning-Work With Constants

Constants are similiar to variables, it is created by using "define" statement, such as:
define ("Yao Ming","Best NBA Center");
a number can also be defined
define("interest", .02);

To display constants, we can use "print_r" or "echo" statement
print_r(Yao Ming);
you will get "Best NBA Center"

Constants are really easy to understand, I will talk about Data in the next php learning session. (Emm, may be you are wondering why today's lesson is so short...... Take it easy, buddy, we will go through this step by step)


View the original article here

No comments:

Post a Comment