[CODE4LIB] looking for a good PHP table-manipulating class

2014-12-11 Thread Ken Irwin
Hi folks,

I'm hoping to find a PHP class that designed to display data in tables, 
preferably able to do two things:
1. Swap the x- and y-axis, so you could arbitrarily show the table with 
y=Puppies, x=Kittens or y=Kittens,x=Puppies
2. Display the table either using plain text columns or formatted html

I feel confident that in a world of 7 billion people, someone must have wanted 
this before.

Any ideas?

Thanks
Ken


Re: [CODE4LIB] looking for a good PHP table-manipulating class

2014-12-11 Thread Cary Gordon
Where do the data come from? An array?

Cary

 On Dec 11, 2014, at 1:32 PM, Ken Irwin kir...@wittenberg.edu wrote:
 
 Hi folks,
 
 I'm hoping to find a PHP class that designed to display data in tables, 
 preferably able to do two things:
 1. Swap the x- and y-axis, so you could arbitrarily show the table with 
 y=Puppies, x=Kittens or y=Kittens,x=Puppies
 2. Display the table either using plain text columns or formatted html
 
 I feel confident that in a world of 7 billion people, someone must have 
 wanted this before.
 
 Any ideas?
 
 Thanks
 Ken


Re: [CODE4LIB] looking for a good PHP table-manipulating class

2014-12-11 Thread Cary Gordon
Of course, the easiest thing to do is search for “php pivot tables”. There are 
many libraries for this, although I don’t recall any that output “plain text”. 
There are some ultra-slick ones that you can buy if you want the output to look 
like something from Excel in 1998.

Cary


 On Dec 11, 2014, at 4:15 PM, Cary Gordon listu...@chillco.com wrote:
 
 Where do the data come from? An array?
 
 Cary
 
 On Dec 11, 2014, at 1:32 PM, Ken Irwin kir...@wittenberg.edu wrote:
 
 Hi folks,
 
 I'm hoping to find a PHP class that designed to display data in tables, 
 preferably able to do two things:
 1. Swap the x- and y-axis, so you could arbitrarily show the table with 
 y=Puppies, x=Kittens or y=Kittens,x=Puppies
 2. Display the table either using plain text columns or formatted html
 
 I feel confident that in a world of 7 billion people, someone must have 
 wanted this before.
 
 Any ideas?
 
 Thanks
 Ken
 


Re: [CODE4LIB] looking for a good PHP table-manipulating class

2014-12-11 Thread Joe Hourcle
On Dec 11, 2014, at 4:32 PM, Ken Irwin wrote:

 Hi folks,
 
 I'm hoping to find a PHP class that designed to display data in tables, 
 preferably able to do two things:
 1. Swap the x- and y-axis, so you could arbitrarily show the table with 
 y=Puppies, x=Kittens or y=Kittens,x=Puppies
 2. Display the table either using plain text columns or formatted html
 
 I feel confident that in a world of 7 billion people, someone must have 
 wanted this before.


There's much more work being done in javascript tables these days than in 
backend software.

Unfortunately, I've never found a good matrix to compare features between the 
various 'data table' or 'data grid' implementations.

I did start evaluating a lot a while back, but the problem is that you have go 
go through them all to figure out what the different features might be, and 
then go back through a second time to see which ones might implement those 
features.

The second problem is that some are implemented as part of a given JS framework 
(eg, ExtJS), while other toolkits might have a dozen different 'data table' 
implementations (eg, jQuery).

-Joe


ps.  and as this wasn't a feature that I was looking for, this wasn't something 
that I tracked when I did my analysis.  I was looking for things like scaling 
to a thousand rows w/ 20 columns, rearranging/hiding columns, etc.


Re: [CODE4LIB] looking for a good PHP table-manipulating class

2014-12-11 Thread Tom Keays
Ken: are you looking for pivot table functions?  I thought you were
describing something more akin to the Excel TRANSPOSE function.

If you are looking for a pivot table library, ADO is a good abstraction
library and has it built in.
http://phplens.com/adodb/pivot.tables.html

If you want to transpose a table, then look for 'php array transposing'. I
don't know of a specific library, but you can find examples in
stackoverflow, etc.



On Thu, Dec 11, 2014 at 7:28 PM, Cary Gordon listu...@chillco.com wrote:

 Of course, the easiest thing to do is search for “php pivot tables”. There
 are many libraries for this, although I don’t recall any that output “plain
 text”. There are some ultra-slick ones that you can buy if you want the
 output to look like something from Excel in 1998.

 Cary


  On Dec 11, 2014, at 4:15 PM, Cary Gordon listu...@chillco.com wrote:
 
  Where do the data come from? An array?
 
  Cary
 
  On Dec 11, 2014, at 1:32 PM, Ken Irwin kir...@wittenberg.edu wrote:
 
  Hi folks,
 
  I'm hoping to find a PHP class that designed to display data in tables,
 preferably able to do two things:
  1. Swap the x- and y-axis, so you could arbitrarily show the table with
 y=Puppies, x=Kittens or y=Kittens,x=Puppies
  2. Display the table either using plain text columns or formatted html
 
  I feel confident that in a world of 7 billion people, someone must have
 wanted this before.
 
  Any ideas?
 
  Thanks
  Ken