How to get structure of an array with data in a hierarchy order in php?

  • 0

To test the array order Add echo “<pre>”; before array printing in php for development.

Eg:

echo “<pre>”;

print_r($a);

Otherwise you need to print array elements as ul li structure.

To test the array order Add echo “<pre>”; before array printing in php for development. Eg: echo “<pre>”; print_r($a); Otherwise you need to print array elements as ul li structure.

To test the array order Add echo “<pre>”; before array printing in php for development. Eg: echo “<pre>”; print_r($a); Otherwise you need to print array elements as ul li structure.