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

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -