note 44833 deleted from function.number-format by betz

From: Date: Tue, 17 Aug 2004 21:10:00 +0000
Subject: note 44833 deleted from function.number-format by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74831@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 (#74831) next »