Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multidimensional arrays

    Code:
     while ($db->next_record()){
                    $anlaeg_bag[] = array('id'=>$db->f(id),'betegnelse'=>$db->f(Betegnelse),'fabrikat'=>$db->f(fabrikat),'type'=>$db->f(anlaegstype),'dato'=>$db->f(Igangsat),'udgaaet'=>$db->f(Udgaaet),'tilbud'=>$db->f(Tilbud));
                }
    Code:
    $anlaeg[$firma[$j]['id']] = $anlaeg_bag;
    is $anlaeg 2 or 3 dimensional array and why?

  • #2
    New Coder
    Join Date
    Sep 2004
    Location
    Arlington, TX
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't quite understand you...

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Location
    West Midlands, UK
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It looks like a three-dimensional array to me, although usually a 3D array will have more than one top level array element, otherwise there's not much point to using a 3D array in the first place.

  • #4
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    Quote Originally Posted by Zekonja
    is $anlaeg 2 or 3 dimensional array and why?
    impossible to tell without knowing what the $db->f method does. if it returns a scalar value then it's a 2D array. if it returns an array then it's a 3D array.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •