Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Yes,
right on the official PHP website: www.php.net/manual/en/function.preg-match-all.php You
can also try to google
$str = str_replace(' ', '', $string);
preg_match("#(\d+)(\.|,)?(\d+)?#", $str, $matches); // preg_match_all если много цен в одной строке
Zend_Number
example:
$locale = new Zend_Locale('de_AT');
$number = Zend_Locale_Format::getNumber('13.524,678',
array('locale' => $locale,
'precision' => 3)
);
print $number; // will return 13524.678
Slightly off topic, but you can’t work with money in floats ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question