Nearly finished with my heirarchical categories hack, and a little PHP question comes up.
if ( $text == 0 ) $text = “Default Text”;
always sets $text to ‘Default Text’
Apparently PHP considers (“any str” == 0) to be TRUE
Is there a reason for this behavior, and how should I tell if a variable contains a zero or a a string?
- The topic ‘PHP help’ is closed to new replies.