On 23-May-01 Wade Halsey wrote:
> Hey
> 
> How can I add a certain number of whitespace chars to a text file?
> I write variables to a text file and I want to seperate them by certain
> numbers of whitespace chars
> 
> eg : $var(40 whitespace)$var2(10 whitespace)
> 

$str=sprintf('%40s%10s', $var, $var2);
fwrite($fp, $str);

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to