Debugging an Array - Print it Recursively with print_r()

Nice and simple one..

If you want to see whats in an entire array, use the print_r function. This will give you a nicely formatted output of the array showing all dimensions. Try it:
$anArray = array(0=>'cheese',1=>'bacon',2=>'apples');
print_r($anArray);

Tip if you are viewing this via the output of a webpage, view the source to see the nicely formatted output or wrap the output in pre tags e.g.

    

Are you a Developer, Designer or Copy Writer? Or Looking For One?

Click here to see 100s of jobs updated every day that you can complete to earn good money. Also find that programmer, designer or copy writer you have been looking for - advertise and get the best guy for your job - click here to find out more

Leave a Reply

Make $100,000/Month - Every Month!

It Works! We Make Our Customers Millionaires! Act now and get $600 bonus and a Free Money Making Website! - click to get started