Determine number of Dimensions in a PHP Array -


Is there a way to decide how many dimensions are there in a PHP array?

Good problem, here it is:

  function countdim ( $ Array) {if (is_array (reset) ($ array)) {$ Return = countdim (reset ($ array)) + 1; } And {$ return = 1; } Return $ return; }  

Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -