echo sprintf("%x","10");
a
Complete the conversion from decimal to hexadecimal;
Can sprintf convert hexadecimal to decimal?
Don’t want to use base_convert function.
echo base_convert('a',16,10);
10
echo sprintf("%x","10");
a
Complete the conversion from decimal to hexadecimal;
Can sprintf convert hexadecimal to decimal?
Don’t want to use base_convert function.
echo base_convert('a',16,10);
10
<code>echo sprintf("%d", 0x00FF);</code>