RE: [PHP] Need routine to tell me number of dimensions in array.
| From: | Daevid Vincent | Date: | Tue, 16 Mar 2010 00:23:21 +0000 |
| Subject: | RE: [PHP] Need routine to tell me number of dimensions in array. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302879@lists.php.net to get a copy of this message | ||
Oh. I know it's not a simple solution to do right Ashley. And exacerbated
by the fact that each array dimension can have different dimensions as
well. This is why I wanted someone else's solution first before I spend
hours or days on one that works reliably. :)
_____
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: Monday, March 15, 2010 4:44 PM
Subject: Re: [PHP] Need routine to tell me number of dimensions in array
The only way to do it reliably would be to iterate the entire array,
element by element, as all the elements of an array might not necessarily
be all of the array type or int's.