Flip a boolean

Caporegime
Joined
16 May 2003
Posts
25,367
Location
::1
Is there any trivial way to flip a Boolean (ie true -> false, false -> true) in PHP?

I know I could use something like
PHP:
if ($bool)
	{
		//$bool is true. Make $bool false.
		$bool = false;
	}
else
	{
		//$bool is false. Make $bool true.
		$bool = true;
	}

But that's a bit messy for what I want to do. Tried reading the manual but got nowhere fast. :o
 
Back
Top Bottom