test for multi-dim array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to recursively loop through a multi dimensional array with
unknown keys and unknown values, and echo the keys/values to a sql
statement, where the key is the field, and the value is the. value.

 

What I want to do is test an array index to see if it has any children
indices (which then need to be looped through again), or if it is the lowest
level child. in which case, the data needs to be extracted.

 

What is the easiest way to test an array index to see if it has one or more
children? Just doing a count() isn't reliable, as their may only be a single
parent on the highest level.

 

John

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux