Discussion board
What is the null in php?
By prabeen patra
Null in php?
Reply
Post   Reset
Teacher SiliconIndia replied to prabeen patra Wednesday, March 17, 2010
Hi Prabeen,
Null is a special data type which can have only one value, which is itself. Which is to say, null is not only a data type, but also a keyword literal. A variable of data type null is a variable that has no value assigned to it. When a variable is created without a value, it is automatically assigned a value of null. This is so that whatever garabage was in that memory location before is cleared out. Otherwise the program may try to process it.