Hello All, I have a quick question about php strcmp
The manual states the following
Returns < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
Can I simply and safely use string compare like this
IF ( !strcmp ($str1, $str2 ) ){
# DO WHAT EVER AND WHEN EVER both strings are exactly equal and strcmp = 0 or FALSE
}ELSE{
# DO WHAT EVER AND WHEN EVER strcmp is LESS than zero or GREATER then zero or TRUE as it were
}
Thanks for any explainations
I'm not sure if a -1 or negative number in general evaluates out to TRUE or FALSE???