Hello people :)
i'm trying to insert query result into 2 dimensional array
i have tried the following way..
$query=mysql_query("...");
while($row=mysql_fetch_array($query)){
for($i=0;$i<=$index;$i++){
if(isset($myarray[$i]['array1'])|| isset($myarray[$i]['array2'])){
array_unshift($myarray[$i]['array1'],$row['study_period']);
array_unshift($myarray[$i]['array2'],$row['test']);
}//endif
}//endfor
}//endwhile
But, it failed
i also tried..
$query=mysql_query("...");
while($row=mysql_fetch_array($query)){
$myarray=array( array("array1"=>$row['study_period'],"array2"=>$row['test'])
);
}//endwhile
it failed too since it only take the first index of array(myarray[0][]).
I think i'll use the second but i need the array to increment its index as in the first. i wonder how to do this with the second way.
I hope i made my question clear :D
Thank you :)