PHP help
-
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 TRUEIs there a reason for this behavior, and how should I tell if a variable contains a zero or a a string?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘PHP help’ is closed to new replies.