DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

How to Print the structure of array

By: Shailesh Singh | 05 Sep 2008 4:42 pm

print_r();

Will Print the structure of the array

<?php
    $Names = array ('a' => 'Angela', 'b' => 'Bradley', 'c' => array ('Cade', 'Caleb'));
    print_r ($Names);
    ?>

The results would be something like:

Array
(
[a] => Angela
[b] => Bradley
[c] => Array
     (
     [0] => Cade
     [1] => Caleb
     )
)

Comments

No Comments Posted for this Article.

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move