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.
Visual PHP Arrays
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Visual PHP Arrays
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.
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.
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Visual PHP Arrays
Takes a little PHP work but integrates with Firebug for Firefox: http://www.firephp.org/HQ/Learn.htmphaedo5 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.
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.
Re: Visual PHP Arrays
+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.AbraCadaver wrote:Takes a little PHP work but integrates with Firebug for Firefox: http://www.firephp.org/HQ/Learn.htm
-
minorDemocritus
- Forum Commoner
- Posts: 96
- Joined: Thu Apr 01, 2010 7:28 pm
- Location: Chicagoland, IL, USA
Re: Visual PHP Arrays
var_dump() is a bit easier than <pre> tags. I'm not sure how good it is for nested arrays, through.
Re: Visual PHP Arrays
Awesome. Thanks for the response guys. I'm going to give this FirePHP a shot. That sounds great!