Solved

Need to convert Denary to Hex

Posted on 2006-11-28
6
290 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now