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

php - multilevel menu with multilevel array -

c# - TypeConverter in propertygrid only converts from string, not to -

jQuery UI: Datepicker month format -