Outputting Text Files?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Number1SuperGuy
Forum Newbie
Posts: 10
Joined: Thu Jun 17, 2010 11:21 am

Outputting Text Files?

Post by Number1SuperGuy »

I've got some arrays and database information which I need to output as a text file with columns, padded by spaces. I've never outputted text files and I don't know how to count digits and add spaces, could I get some advice for getting started on this project? Let me know if I need to be more clear.

Thanks guys!
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Re: Outputting Text Files?

Post by liljester »

http://us2.php.net/manual/en/ref.strings.php

check out the strlen() and str_pad() functions
Post Reply