dechex():hexadecimal equivalent of decimal number

string dechex(int $number);
$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.

Example : Decimal to hexadecimal

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

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here .

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