tags:

views:

53

answers:

2

The following code:

print_r($_GET);
echo '<br />';
echo isset($_GET['logout'])?'yes':'no';

prints:

Array ( [logoout] => )
no

Why is it printing "no" instend of "yes"?

+5  A: 

logoout - double "o"

MartyIX
Holy shit, how I haven't seen that? Blame me, sorry :(
M28
It is simple. You don't use strict mode in PHP ;-). Use this function http://www.w3schools.com/PHP/func_error_reporting.asp at the beginning of your script with E_ALL level.
MartyIX
+2  A: 

take a break man...

Parhs
Working for 5 hours, BUT I CAN'T STOP T_T
M28