In need of PHP to JS collapsable array printing routine?

In need of PHP to JS collapsable array printing routine?

am 30.01.2010 00:54:33 von Daevid Vincent

I'm wondering if anyone has a PHP debug-type routine that will take a PHP
array and output it to the web page, but make all the dimensions of the
array collapsable, ideally showing each sub-key (or index) as the name to
click to expand it again.

I'm dealing with some rather huge datasets in multi-dimensional hashes and
printing them out with a beautified print_r() is just not cutting it
anymore. I need to collapse them down to wrap my head around them. Some of
them have 6 or more dimensions!

I use jQuery for JS if that helps (in case your routine requires that too).


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: In need of PHP to JS collapsable array printing routine?

am 30.01.2010 01:26:59 von Trevor Gryffyn

Take a look at the Firebug addon for Firefox and another addon called
"FirePHP" or "FireConsole" (the new name coming soon). It lets you
output PHP debugging data to HTTP headers that show up in your Firebug
console. I believe it supports collapsable tree type output.

-TG

----- Original Message -----
From: "Daevid Vincent"
To:
Date: Fri, 29 Jan 2010 15:54:33 -0800
Subject: [PHP] In need of PHP to JS collapsable array printing routine?

> I'm wondering if anyone has a PHP debug-type routine that will take a PHP
> array and output it to the web page, but make all the dimensions of the
> array collapsable, ideally showing each sub-key (or index) as the name to
> click to expand it again.
>
> I'm dealing with some rather huge datasets in multi-dimensional hashes and
> printing them out with a beautified print_r() is just not cutting it
> anymore. I need to collapse them down to wrap my head around them. Some of
> them have 6 or more dimensions!
>
> I use jQuery for JS if that helps (in case your routine requires that
too).
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: In need of PHP to JS collapsable array printing routine?

am 30.01.2010 02:09:44 von Ashley Sheridan

--=-oFHhmJozx28W/JdNW640
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Fri, 2010-01-29 at 15:54 -0800, Daevid Vincent wrote:

> I'm wondering if anyone has a PHP debug-type routine that will take a PHP
> array and output it to the web page, but make all the dimensions of the
> array collapsable, ideally showing each sub-key (or index) as the name to
> click to expand it again.
>
> I'm dealing with some rather huge datasets in multi-dimensional hashes and
> printing them out with a beautified print_r() is just not cutting it
> anymore. I need to collapse them down to wrap my head around them. Some of
> them have 6 or more dimensions!
>
> I use jQuery for JS if that helps (in case your routine requires that too).
>
>


I know it's not quite what you want, but what about copying and pasting
the output from the view source to a more advanced text editor like Kate
or Notepad++. They both support code-folding, and allow you to minimise
blocks of code at points in the text, usually where you have opened
brackets, etc. This also comes in handy when you're developing too.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-oFHhmJozx28W/JdNW640--

Re: In need of PHP to JS collapsable array printing routine?

am 30.01.2010 03:48:27 von Jochem Maas

Op 1/30/10 12:54 AM, Daevid Vincent schreef:
> I'm wondering if anyone has a PHP debug-type routine that will take a PHP
> array and output it to the web page, but make all the dimensions of the
> array collapsable, ideally showing each sub-key (or index) as the name to
> click to expand it again.
>
> I'm dealing with some rather huge datasets in multi-dimensional hashes and
> printing them out with a beautified print_r() is just not cutting it
> anymore. I need to collapse them down to wrap my head around them. Some of
> them have 6 or more dimensions!
>
> I use jQuery for JS if that helps (in case your routine requires that too).

what everyone else said ... additionally check out the recent archives for
posts by Rene Veerman ... his current pet project seems to be something that
would be of interest you.

>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: In need of PHP to JS collapsable array printing routine?

am 31.01.2010 11:19:59 von Rene Veerman

http://mediabeez.ws/htmlMicroscope/

I'll b cleaning up & releasing the 1.3.0 code today / early next week..

On Sat, Jan 30, 2010 at 12:54 AM, Daevid Vincent wrote:
> I'm =A0wondering if anyone has a PHP debug-type routine that will take a =
PHP
> array and output it to the web page, but make all the dimensions of the
> array collapsable, ideally showing each sub-key (or index) as the name to
> click to expand it again.
>
> I'm dealing with some rather huge datasets in multi-dimensional hashes an=
d
> printing them out with a beautified print_r() is just not cutting it
> anymore. I need to collapse them down to wrap my head around them. Some o=
f
> them have 6 or more dimensions!
>
> I use jQuery for JS if that helps (in case your routine requires that too=
).
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php