Solved

Need to convert Denary to Hex

Posted on 2006-11-28
6
291 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

895 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

11 Experts available now in Live!

Get 1:1 Help Now