Re: [PHP] How to format CLI tabular data?

2007-10-10 Thread tedd
At 12:30 PM -0700 10/9/07, Jim Lucas wrote: tedd wrote: At 12:05 AM -0700 10/9/07, Jim Lucas wrote: Daevid Vincent wrote: Does PHP have any tools like this? I'd prefer not to pull in some PEAR package or other bloat, but I'll take what I can get if it actually works well. I was hoping there ar

Re: [PHP] How to format CLI tabular data?

2007-10-10 Thread tedd
At 12:30 PM -0700 10/9/07, Jim Lucas wrote: tedd wrote: Thanks for the code. I've altered it to display a table in a browser: http://webbytedd.com/bbb/table/ Code is shown there. -snip- I wouldn't use that to display tabular data in a browser. I will attach what I use to display in a brows

Re: [PHP] How to format CLI tabular data?

2007-10-09 Thread Jim Lucas
tedd wrote: At 12:05 AM -0700 10/9/07, Jim Lucas wrote: Daevid Vincent wrote: Does PHP have any tools like this? I'd prefer not to pull in some PEAR package or other bloat, but I'll take what I can get if it actually works well. I was hoping there are some tips/tricks to show simple tabular d

Re: [PHP] How to format CLI tabular data?

2007-10-09 Thread tedd
At 12:05 AM -0700 10/9/07, Jim Lucas wrote: Daevid Vincent wrote: Does PHP have any tools like this? I'd prefer not to pull in some PEAR package or other bloat, but I'll take what I can get if it actually works well. I was hoping there are some tips/tricks to show simple tabular data: -snip- not

Re: [PHP] How to format CLI tabular data?

2007-10-09 Thread Richard Heyes
Daevid Vincent wrote: I write many CLI scripts in PHP to clean up DB records, etc via crontab scripts. Often though, I implement command line switches to 'debug' or see various data as a precaution before actually purging. Perl has some neat tools built in to format tabular data: http://www.usen

Re: [PHP] How to format CLI tabular data?

2007-10-09 Thread tedd
At 3:59 PM -0700 10/8/07, Daevid Vincent wrote: I write many CLI scripts in PHP to clean up DB records, etc via crontab scripts. Often though, I implement command line switches to 'debug' or see various data as a precaution before actually purging. Perl has some neat tools built in to format tab

Re: [PHP] How to format CLI tabular data?

2007-10-09 Thread Jim Lucas
Daevid Vincent wrote: I write many CLI scripts in PHP to clean up DB records, etc via crontab scripts. Often though, I implement command line switches to 'debug' or see various data as a precaution before actually purging. Perl has some neat tools built in to format tabular data: http://www.usen

Re: [PHP] How to format CLI tabular data?

2007-10-08 Thread Larry Garfield
Look into sprintf(). I believe it has whitespace formatting codes that are wonderfully suited to this case. (They're derived from C, where the printf() routine is used quite frequently for that sort of screen output.) On Monday 08 October 2007, Robert Cummings wrote: > On Mon, 2007-10-08 at 15

Re: [PHP] How to format CLI tabular data?

2007-10-08 Thread Robert Cummings
On Mon, 2007-10-08 at 15:59 -0700, Daevid Vincent wrote: > I write many CLI scripts in PHP to clean up DB records, etc via crontab > scripts. Often though, I implement command line switches to 'debug' or see > various data as a precaution before actually purging. > > Perl has some neat tools built

[PHP] How to format CLI tabular data?

2007-10-08 Thread Daevid Vincent
I write many CLI scripts in PHP to clean up DB records, etc via crontab scripts. Often though, I implement command line switches to 'debug' or see various data as a precaution before actually purging. Perl has some neat tools built in to format tabular data: http://www.usenix.org/publications/perl