Link to home
Start Free TrialLog in
Avatar of Chris Andrews
Chris AndrewsFlag for United States of America

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?
ASKER CERTIFIED SOLUTION
Avatar of r_bielak
r_bielak

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chris Andrews

ASKER

ah, thank you, that helps with the stuff I'm trying to add in, appreciate it.