Grabbing specific values from a multi-dimensional array in PHP

occubbeli

New Member
I'm new to programming and I'm tackling arrays. I thought I had multi-dimensional arrays figured out but I guess I don't. Here's the code I'm working on:\[code\]$loopcounter = 0; while ($myrow = mysql_fetch_array($results)) {//...other stuff happens...$allminmax[$loopcounter][] = array("$myrow[3]","$currentcoltype","$tempmin","$tempmax");$loopcounter++;\[/code\]}This chunk of code is supposed to create an array of four values ($myrow[3], currentcoltype, tempmin, tempmax) and insert it into another array every time the loop goes through. When I do this:\[code\]echo implode($allminmax);\[/code\]I get:\[code\]ArrayArrayArrayArrayArrayArrayArrayArrayArray\[/code\]Do I need to implode each array before it goes into the master array? I really want to be able to do something like $allminmax[0][4] and get the $tempmax for the first row. When I try this now nothing happens. Thanks -- any help is appreciated!
 
Back
Top