Mega Code Archive

 
Categories / Php / Functions
 

Displaying the same number in different formats

<?php $value=42; printf("%d<br />",$value); printf("%b<br />",$value); printf("%c<br />",$value); printf("%f<br />",$value); printf("%o<br />",$value); printf("%s<br />",$value); printf("%x<br />",$value); printf("%X<br />",$value); ?>