note 29934 deleted from function.sprintf by dave

From: Date: Wed, 11 Aug 2004 08:56:51 +0000
Subject: note 29934 deleted from function.sprintf by dave
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79690@lists.php.net to get a copy of this message
Note Submitter: retestro_REMOVE@SPAM_esperanto.org.il ---- Pay attention, that PHP's printf() and sprintf() do NOT support special flags, as the '+' one (makes a sign appear before the number, regardless of whether it's negative or positive). It took me a while to figure that out: you have to write it yourself... use something similar to the following ($value >= 0) ? printf('+%d', $value) : printf('%d', $value);

« previous php.notes (#79690) next »