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);
?>
Related examples in the same category