dechex():hexadecimal equivalent of decimal number

<?Php
echo dechex(2); // Output 2 
echo "<br>";
echo dechex(25); // Output 19 
echo "<br>";
echo dechex(200); // Output is c8
echo "<br>";
echo dechex(358); // Output is 166
echo "<br>";
echo dechex(2000); // Output is 7d0
?>
Syntax
string dechex(int $number);
ParameterDESCRIPTION
$numberRequired : Decimal number as Input to convert to equivalent hexadecimal number.
The output is string converted to hexadecimal base system.

Hexadecimal is positional numeral system with base of 16. The chars it used are from 0 to 9 and from A to F.

Math Functions base_convert(): Convert number From any base to other bindec(): Decimal equivalent of Binary string decbin() Binary equivalent of decimal number
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here





    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer