FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » detection of 2d array?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: detection of 2d array? [message #183444 is a reply to message #183443] Thu, 24 October 2013 22:12 Go to previous messageGo to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
On Fri, 25 Oct 2013 00:10:29 +0200, J.O. Aho wrote:

> On 24/10/13 23:39, richard wrote:
>> given the example>>>
>>
>> array=("item","photo"),
>> array=("item",array=("photo1","photo2")),
>> array=("item","photo")
>>
>> Is there any way of knowing when an array item has a subarray item?
>>
> is_array() shoulr be able to tell you if a variable is an array
>
> $array=array("item", array("photo1","photo2"));
>
> foreach($array as $key => $cell)
> if(is_array($cell))
> echo "cell {$key} has an array\n";
>
> see http://www.php.net/manual/en/function.is-array.php

thanks. I'll play with it and see what happens.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: detecting a file in use
Next Topic: Mysqli or PDO Persistent prepared statements
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 23:18:17 GMT 2024

Total time taken to generate the page: 0.04452 seconds