note 44834 deleted from function.number-format by tomsommer

From: Date: Tue, 17 Aug 2004 21:34:03 +0000
Subject: note 44834 deleted from function.number-format by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74835@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: <?php $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 (#74835) next »