PHP Tutorial : Constants and Variables

Hi,

I didn’t writed here for 3 days because of the holidays stuff, etc. and now I got a little bit of free time to write about php variables and constants. Variables and constants in php are doing almost the same thing, but the aspect who shows very well the difference between those two things in php coding are the way they get created.

Variables are beeing created and printed in this way :

The constants are defined in the next way :

The is a set of rules for both such as must begin with a letter, doesn’t allow to containt dashes such as “-“, but there is allowed “_”. For more informations please check the official php website.

Thanks!

Tagged with: , , , ,
Posted in Basic PHP

Leave a Reply

Your email address will not be published. Required fields are marked *

*