Formating

From: Date: Tue, 05 Jul 2005 01:48:06 +0000
Subject: Formating
Groups: php.general 
Request: Send a blank email to php-general+get-218114@lists.php.net to get a copy of this message
Hi everybody, I've searched the docs for a generic way to format strings and numbers... For example I have a brazilian zipcode witch is stored in database as 22252970 and must be formatted as NNNNN-NNN, where N is a number. Also I have a tax id with is also stored as numeric value only, for example 05117635472 and outputted as NNN.NNN.NNN-NN... Is that any way that I can do it generic, storing the formatting strings ('NNNNN-NNN') with languages strings, so it is localised and this would be parsed as: string::format($string, $format); Best Regards, Bruno B B Magalhaes

« previous php.general (#218114) next »