Visual PHP Arrays

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
phaedo5
Forum Newbie
Posts: 6
Joined: Tue May 20, 2008 4:42 pm

Visual PHP Arrays

Post by phaedo5 »

I program in PHP daily. I often have to mess with very large, very nested arrays. I was wondering what you guys use to see large arrays other than <pre> tags and print_r. I've seen a couple of classes that organize them a little, but nothing has blown me away. I guess I'm hoping to hear someone way, YEAH! there's this thing in Firebug or something like that.

So really just curious if anyone has any tips.
User avatar
flying_circus
Forum Regular
Posts: 732
Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR

Re: Visual PHP Arrays

Post by flying_circus »

I'm not sure how firebug will allow you to view PHP arrays.

I use NuSphere PhpEd to develop. It has a built in debugger, which uses dbg. I can stop the script at runtime and any declared variables are shown in the debugger console. Arrays are represented as a familiar expandable/collapsible tree structure.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Visual PHP Arrays

Post by AbraCadaver »

phaedo5 wrote:I program in PHP daily. I often have to mess with very large, very nested arrays. I was wondering what you guys use to see large arrays other than <pre> tags and print_r. I've seen a couple of classes that organize them a little, but nothing has blown me away. I guess I'm hoping to hear someone way, YEAH! there's this thing in Firebug or something like that.

So really just curious if anyone has any tips.
Takes a little PHP work but integrates with Firebug for Firefox: http://www.firephp.org/HQ/Learn.htm
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Visual PHP Arrays

Post by Weirdan »

AbraCadaver wrote:Takes a little PHP work but integrates with Firebug for Firefox: http://www.firephp.org/HQ/Learn.htm
+1 for FirePHP. We use it for about 1.5 years where I work, and it's a real savior. The only problem is that it's for Firefox only.
minorDemocritus
Forum Commoner
Posts: 96
Joined: Thu Apr 01, 2010 7:28 pm
Location: Chicagoland, IL, USA

Re: Visual PHP Arrays

Post by minorDemocritus »

var_dump() is a bit easier than <pre> tags. I'm not sure how good it is for nested arrays, through.
phaedo5
Forum Newbie
Posts: 6
Joined: Tue May 20, 2008 4:42 pm

Re: Visual PHP Arrays

Post by phaedo5 »

Awesome. Thanks for the response guys. I'm going to give this FirePHP a shot. That sounds great!
Post Reply