Solved

Need to convert Denary to Hex

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


ie turn 255 into FF

Tony
0
Comment
Question by:tonelm54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
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 i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

695 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