Re: string manipulation

From: Date: Thu, 12 Aug 2004 17:02:46 +0000
Subject: Re: string manipulation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193606@lists.php.net to get a copy of this message
> Hi I am trying to track down a method for transferring a database id > such as 5 into a nice formatted order id such as ORD0005 - where the > format for the order id is "ORD" + 5 digits made up of the database id See documentation for sprintf(). Try something like: $formatted = sprintf('ORD%05d', $id); --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#193606) next »