Re: note 10503 added to decbin

From: Date: Mon, 08 Jan 2001 08:59:31 +0000
Subject: Re: note 10503 added to decbin
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-9469@lists.php.net to get a copy of this message
Just 0-pad it with printf/sprintf ie. $num = "1"; printf("%03d",$num); -Rasmus On 8 Jan 2001 daduke@dataway.ch wrote: > Hi, > > is there a way to specify the width of the binary word? E. g. I have to translate 0..7 to > "000".."111". Just using decbin doesn't give "000" but > "0". > > tnx, Christian > > http://www.php.net/manual/function.decbin.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: php-notes-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.notes (#9469) next »