Can you define the maxes for both int and num?
Im using num for a post
When i enter 9999999999999 it passes -15304950.76
When i enter 999999999999 it passes 2764471.32
When i enter 99999999999 it passes 13161348.12
When i enter 9999999999 it passes -7273800.68
When i enter 999999999 it passes 12157520.92
When i enter 99999999 it passes 14100653.08
When i enter 9999999 it finally passes 9999999
Whats going on here??
NOTE: before it is displayed it is passed thru this. (truncates the number to 2 decimals without rounding.
Quote:
function truncate($number, $places){
return intval($mynumber * pow(10,$places))/pow(10,$places);
}
$vbulletin->GPC['num'] = truncate($vbulletin->GPC['num'], 2);
|
--------------- Added [DATE]1196465816[/DATE] at [TIME]1196465816[/TIME] ---------------
Seems my Truncate function was causing it, But now it passes numbers like
1.0E+17
How do i restrict it from doing this and just passing the number?