Solved

Need to convert Denary to Hex

Posted on 2006-11-28
6
294 Views
Last Modified: 2012-06-27
Need to convert normal denary to hex.


ie turn 255 into FF

Tony
0
Comment
Question by:tonelm54
  • 4
  • 2
6 Comments
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 500 total points
ID: 18032572
tonelm54,

Use the dechex function.  For example ...

echo dechex(255);

Will give you FF.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 6

Expert Comment

by:aescnt
ID: 18034724
By the way, do you mean "decimal" instead of "denary"? :)
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18038389
My comment assumes that it was a typo and you meant decimal.

bol
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 6

Expert Comment

by:aescnt
ID: 18039925
Hehe, I meant to ask that to the asker. :) I thought decimal, too.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18040629
@Aescnt - I realized that, especially since I didn't use "denary."  Your comment made me realize that I should note the "correction" I made.  My post was a notice to Tonelm54 just in case I was wrong about the typo.

bol
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18069929
I'm glad that I could help you.  Thank you for the grade, the points and the fun question.

bol
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question