note 92971 deleted from function.number-format by cmb

From: Date: Tue, 13 Nov 2018 11:39:46 +0000
Subject: note 92971 deleted from function.number-format by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-209693@lists.php.net to get a copy of this message
Note Submitter: Peter de Pijd ---- If you want to use nbsp as decimal/thousand delimiter with UTF-8 you have to replace the whitespace after using number_format: <?php $number = number_format(1000, 0, ".", " "); // normal space echo str_replace(" ", utf8_encode("\xA0"), $number); // or echo str_replace(" ", html_entity_decode("&nbsp;", ENT_COMPAT, "UTF-8"), $number); ?>

« previous php.notes (#209693) next »