Is there any builtin function for PHP that will take a boolean value and return its integer equivalent? 0 for FALSE, 1 for TRUE?
Of course you can easily create a function to do so, I'm just asking if there is a builtin function inside of PHP. I already tried intval() and casting it to (int) but they didnt work, they return 0 in both cases of TRUE and FALSE.
Edit : the problem was that it wasnt really a boolean, it was a string "false", "true", php didnt detect the jquery post that it passed a boolean. problem solved, thanks !
echo (int)TRUE;- If this returns 0 for you, then you have something very very broken - NorthBridge