For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2005 > Re: [PHP-DB] printf() in a variable, or alternative to printf()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] printf() in a variable, or alternative to printf()
Simon Rees

2005-05-27, 3:56 pm

On Friday 27 May 2005 04:49, mayo wrote:
> 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.


Use sprintf
see:
http://uk2.php.net/manual/en/function.sprintf.php

Si

=2D-=20
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~
Simon Rees =C2=A0| =C2=A0tech-lists@zodiac2000.co.uk =C2=A0|
ORA-03113: end-of-file on communication channel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com