Chris Andrews
asked on
What does this double == do?
I'm editing some code written by someone else.
I trying to figure this statement out:
$tried2 = ($_POST['f_tried2'] == 'yes');
the data being posted (f_tried2) would either be 'yes' or nothing.
I understand that one = assigns a value. And I have used double == to test equavelency in an 'if' statement. But does this statement make the value 'yes' if the post has something in it or what?
I trying to figure this statement out:
$tried2 = ($_POST['f_tried2'] == 'yes');
the data being posted (f_tried2) would either be 'yes' or nothing.
I understand that one = assigns a value. And I have used double == to test equavelency in an 'if' statement. But does this statement make the value 'yes' if the post has something in it or what?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER