View Single Post
Old 04-09-2003, 12:42 PM  
rossiya2
Confirmed User
 
Join Date: Nov 2002
Posts: 287
Has anyone noticed the PHP conditional logic doesn't extend to scalars?

This gives $result a concrete value as it should:
$result = (1 = = 2) ? 1 : 0;

This however sets $result to an empty string [as best I can guess]
$result = (1 = = 2);

While the (1 = = 2) works perfectly in control structures.
__________________
<a href="mailto:[email protected]">sales@cologroup. com</a> | 52027820 | <a href="http://www.cologroup.com">www.cologroup.com</a>
rossiya2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote