Re: How to determine the parameter is a 1 dimension array or not?
| From: | Christian Reiniger | Date: | Mon, 19 Feb 2001 19:28:21 +0000 |
| Subject: | Re: How to determine the parameter is a 1 dimension array or not? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40616@lists.php.net to get a copy of this message | ||
On Monday 19 February 2001 19:45, Zenith wrote:
> In a self defined function, a one dimension or two dimension array may
> be passed,
> How can I check that, the passed in array is a one dimension array or a
> two dimension array?
Well, actually an array can be both 1-dimensional and 2-dimensional at
the same time. Example:
$WeirdDArray = array ('1dim' => 'Hello man',
'2dim' => array ('Hello', 'man')
'1d2' => 42);
So it depends on what you mean with "2-dimensional"...
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
I saw God --------- and she was black.