• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Help me make a unit conversion script

Asgorath

[H]ard|Gawd
Joined
Jul 12, 2004
Messages
1,253
Throughout my website I have dimensions in inches. I would like to be able to put a small bit of code wherever an inches dimension is mentioned, and have the display come out also in cm. I know PHP can do this, but I don't know how to write it, could someone help?

Example:

Display Before:

10"

Code: (I don't know proper code, so just work with me here)

inToCm(10);

Display After:

10" (25.4 cm)

I would like the cm dimension to one decimal point.

If anyone would like to help me with this, it would be much appreciated.
 
Back
Top