solarisuser Posted April 14, 2006 Share Posted April 14, 2006 I can't seem to the array to give me any values. Below is the code I have...FYI : the values of first, second, third, fourth, and fifth are Y,N, Y, Y, N[code]$idnum = 1;$statement = "SELECT first,second,third,fourth,fifth FROM maindb where id=$idnum";$result = mysql_query($statement);$data=array(); while($row=mysql_fetch_array($result,MYSQL_NUM)){ $data[]=array( 'first' => $row[0], 'second' => $row[1], 'third' => $row[2], 'fourth' => $row[3], 'fifth' => $row[4]); extract($data, EXTR_PREFIX_SAME, "wddx");}print "$first is first";[/code]When I do a print_r($data), I get this:[code]Array( [0] => Array ( [first] => Y [second] => N [third] => Y [fourth] => Y [fifth] => N ))[/code]I'm so confused! =( Link to comment https://forums.phpfreaks.com/topic/7366-difficulty-reading-array/ Share on other sites More sharing options...
kenrbnsn Posted April 14, 2006 Share Posted April 14, 2006 Why are you confused? What were you expecting to see?Ken Link to comment https://forums.phpfreaks.com/topic/7366-difficulty-reading-array/#findComment-26873 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.