/ Published in: PHP
Expand |
Embed | Plain Text
Comments
Subscribe to comments
You need to login to post a comment.
level09 on 03/21/10
2 people have marked this snippet as a favorite
Subscribe to comments
You need to login to post a comment.
Why the last $ip = "" ?
If nothing was done to the variable, then it should still have its original value, which is the same that is being entered at the end. There's no need for it, since it will only be executed when non of the previous if-statements worked.
it helps keeping the return type consistent ( string) , so it'll return empty string instead of NULL