Re: printf() in a variable, or alternative to printf()

From: Date: Wed, 01 Jun 2005 06:08:14 +0000
Subject: Re: printf() in a variable, or alternative to printf()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-216125@lists.php.net to get a copy of this message
http://php.net/sprintf On Thu, May 26, 2005 8:35 pm, mayo said: > I need to be able to format data. > > Printf() is perfect because I need a certain amount of characters (30 > for address). > > However I need this formatted data to be inside a file that's fwrite() > and then FTPed to a distributor who will parse it and input into their > database. > > > printf("% 4d",$orderID[0]); does not work in > > $thisContent=" > > "data" . > "moredate" . > "evenmoredata" . > > "; > > > In effect I need the output of printf() to be placed inside a variable > and I don't see how to do that. Str_pad(), of course, does not work. > > Thx for any hints. > > mayo > -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#216125) next »