NULL Type in PHP

Filed in php-lesson1(variables) 0 comments

The Type NULL has only one possible value which is the value NULL.To give a variable the NULL value you should simply assign it such as follows:

$MyVariable = NULL;

the NUL type is capitalized by convention, but in fact it is incasesensitive. you can give the NULL type in lowercase letter too
such as follows:

$MyVariable = null;

so what doess NULL really mean?
actually the term “NULL” is nothing.NULL does not mean zero or blank space.It means no value or nothing.
ther is a diffrence between a variable that has not yet been assigned and a variable that has a null value

The ways that a NULL value would be created

  • It has been specifically assigned the value Null.
  • It has been erased using the function unset().
  • It has not been set to any predefined value.

Related posts:

  1. Assigning Variables in PHP
  2. PHP Variables Basic
  3. Integer Type in PHP
  4. Boolean Types in PHP
  5. Variable Types in PHP
  6. Double Type in PHP
Posted by voshka   @   11 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