If there isn't a function to do exactly what you want, you could use dec2bin() to at least get the binary and work from there: http://us3.php.net/manual/en/function.decbin.php -TG = = = Original message = = = Is there a php function I can call to pass in a number and get the values returned? For example, pass in 7 and get 1,2,4 ? Thanks! ___________________________________________________________ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php