PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I think you are seeing a behavior of echo rather than the internal representation of the data. It's probably just how Rasmus first implemented it (maybe because of how Perl interpreted the vars) and it has stayed that way. To really check the vars try:
You're casting a boolean object to a string. The behavior is documented here: http://us2.php.net/manual/en/language.t ... ng.casting claiming that setting it empty will make it possible to cast back to boolean (although a string = '0' also casts to zero).
It's one of life's little mysteries. I'd believe arborint.
I think that passing checkboxes follows along the same lines. When a checkbox array var is passed that is checked, it passes as 'On', but when it is not checked it passes as ''. I always wondered this, but never enough to bring it up. Thanks for starting the thread.