note 107094 modified in function.abs by danbrown

From: Date: Fri, 06 Jan 2012 19:10:27 +0000
Subject: note 107094 modified in function.abs by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185403@lists.php.net to get a copy of this message
Easy way to toggle a bit using abs(): <?php $flag = 1; // either 0 or 1 $flag = abs($flag - 1); ?> --was-- Easy way to toggle a bit using abs(): $flag = 1; // either 0 or 1 $flag = abs($flag - 1); http://php.net/manual/en/function.abs.php

« previous php.notes (#185403) next »