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
Post a Comment