View Single Post
Old 04-09-2003, 12:48 PM  
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
Quote:
Originally posted by rossiya2
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.
what exactly were you expecting?
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote