note 27984 rejected from function.sprintf by nicos

From: Date: Sat, 28 Dec 2002 18:41:10 +0000
Subject: note 27984 rejected from function.sprintf by nicos
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-41388@lists.php.net to get a copy of this message
Correction to the above (d'oh!): You need to use an intermediary for some reason, e.g. $v = sprintf("%.3f", (float)$v); $v = ereg_replace("\\.0+\$|(\\.[^0]+)0+\$", "\\1", $v);

« previous php.notes (#41388) next »