note 44832 deleted from function.number-format by betz

From: Date: Tue, 17 Aug 2004 21:09:38 +0000
Subject: note 44832 deleted from function.number-format by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74829@lists.php.net to get a copy of this message
Note Submitter: drew at zitnay dot com ---- A more reliable and concise way of doing what S. Rahmel was trying to do below is as follows: $field_inhalt = str_replace(array(".", ","), array("", "."), $field_inhalt); The str_replace() call will first replace all dots with blanks, and then replace all commas with dots. That way, it doesn't break down when you try a number over one million (i.e. 1.010.453,21). Drew

« previous php.notes (#74829) next »