Jump to content

[SOLVED] Recalling toplevel of array


richrock

Recommended Posts

I have an array that has 'levels' - by which I mean:

 

Item 1 - Item a

            Item b - Part 1

                        Part 2

            Item c

Item 2 - Item a

            Item b

Item 3 - .... etc

 

All I would like to do is return a list of top level elements in this array - so I would get: Item 1, Item 2, Item 3, without the sub parts like Item a, Part 1, etc.  I can't seem to find a function on php.net that does this... Can it be done?

 

Link to comment
https://forums.phpfreaks.com/topic/173657-solved-recalling-toplevel-of-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.