[eluser]jedd[/eluser]
[quote author="ahmedi" date="1257972488"]thanks you man, what is the meaning of puting $b=null ? how it works ?[/quote]
If you want to know how it works, read the CI source.
If you want to know what it does, it assigns a default value to the $b variable - which will be used if one does not come in via the URL.
It could take you several minutes of experimentation before you worked this out for yourself.
An alternative answer to your first question is to test for the presence of a variable before trying to use it. The isset() function would be appropriate.