Jump to content

cairesdesigns

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cairesdesigns's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok well say i have this number "63,961,764,106,441" the script puts out this "$6.39617641064E+13961764106 Til" something is definitly wrong there
  2. Could you take my code that i have and add that into it, I couldn't get it to work
  3. Well see what i have works to a small extent, see if i have a really big number, say 9999999999. it will display 9,999999999Tril instead of lets say 9.9Tril
  4. I currently am working on a text-based RPG and I need some help with a script that makes abbreviations for the users money, for example if a user has $1,000,000 I would like it to be converted to $1.0 Mil instead etc... If anyone could please help this would be great, or if you already know of functions that are able to do this please let me know! It would be much appreciated. So far this is what I have come up with [code] function abrev($number) { $num = strlen($number); if($num > 18) { print substr($number, 0, -18); print substr($number, -18, strpos($number, '0')); print " Quin"; } elseif($num > 15) { print substr($number, 0, -15); print substr($number, -15, strpos($number, '0')); print " Quad"; } elseif($num > 12) { print substr($number, 0, -12); print substr($number, -12, strpos($number, '0')); print " Til"; } elseif($num > 9) { print substr($number, 0, -9); print substr($number, -9, strpos($number, '0')); print " Bil"; } elseif($num > 6) { print substr($number, 0, -6); print substr($number, -6, strpos($number, '0')); print " Mil"; } else { print number_format(floor($number)); } } [/code]
  5. I dont know if this will do you any good but try this [code] <? $user = mysql_fetch_array(mysql_query("SELECT * FROM table WHERE username='$loginname';")); ?> <table width="100%" height="100%"> <tr> <td>Username:<td><?=$user["username"]?></td> </tr> <tr> <td>Password:<td><?=$user["password"]?></td> </tr> </table> [/code] If this doesn't help you out, i would be happy to take a look at your script, contact me by email if you would like that!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.