Search the Community
Showing results for tags 'multidimensional array'.
-
Hi everybody,it's been a couple of days that i'm trying to show the values inside a multidimensional array but unsuccessfully. This is my code: $i=0;$countLow=0;$fissoLow=0;for ($i=0;$i<10; $i++){ $z+=2; $fissoLow = 10*2*$z; $countLow = $fissoLow*$z; $res=array("fissi" => array($fissoLow),"conteggi" => array($countLow)); }for ($j=0; $j<count($res); $j++){ echo $res['fissi'][$j] . " " . $res['conteggi'][$j] . "<br />"; } And this is the (wrong) result: 400 8000 This should be the last row of $res array, not the only one. Waiting your replies
-
Hi all,I'm having trouble looping through a multidimensional array to get a specific output.My array looks like this:$week = array( "Mon" = array("temp" => 3, "visi" => 2, "weat" => 4), "Tue" = array("temp" => 8, "visi" => 1, "weat" => 7), "Wed" = array("temp" etc. . .etc