Sometimes need to judge the dimensions of the array, surfing the internet to find a lot of things like http://www.poluoluo.com/jzxy/201306/215088.html this way of writing, rambling and do not understand what the meaning. Here's what I wrote:
privatestaticfunctionarray_depth($array) {if(!is_array($arrayreturn0; $max_depth1; foreach ($arrayas$value) { if (is_array($value)) { $depth = array_depth($value1; if ($depth$max_depth) { $max_depth$depth; } } } return$max_depth; }
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the PHP judgment array of the dimensions of the encapsulated function, including the aspects of the content, I hope to be interested in PHP tutorial friends helpful.