The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#4
|
|||
|
|||
![]()
Yeah, I see, working on a new one.
![]() Okay, try the below, both with and without the following commented: Code:
// $locale_info['decimal_point'] = ','; Code:
<?php $variables = array( '1999', '1999.49', '1999,49', '1,999.49', '1.999,49', '1,999.5' ); $locale_info = localeconv(); foreach ($variables AS $variable) { // $locale_info['decimal_point'] = ','; $variable_orig = $variable; if ($locale_info['decimal_point'] == ',') { $variable = str_replace(array('.',','), array('','.'), $variable); } else { $variable = str_replace(',', '', $variable); } $variable = sprintf("%01.2f", $variable); echo $variable_orig.' => '.$variable."\n<br />\n"; } ?> Code:
1999 => 1999.00 1999.49 => 1999.49 1999,49 => 199949.00 XX 1,999.49 => 1999.49 1.999,49 => 2.00 XX 1,999.5 => 1999.50 Code:
1999 => 1999.00 1999.49 => 199949.00 XX 1999,49 => 1999.49 1,999.49 => 2.00 XX 1.999,49 => 1999.49 1,999.5 => 2.00 XX |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|