...

View Full Version : Multidimensional arrays



Zekonja
06-23-2005, 11:51 AM
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));
}


$anlaeg[$firma[$j]['id']] = $anlaeg_bag;

is $anlaeg 2 or 3 dimensional array and why?

JBChris
06-23-2005, 05:57 PM
I don't quite understand you...

delinear
06-23-2005, 09:52 PM
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.

devinemke
06-23-2005, 09:54 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum