$sqlquery = $connect->query("SELECT * FROM student,finalresults WHERE finalresults.stid = student.userid"); while ( $rows = $sqlquery->fetch_assoc() ) { $total = $rows["marks"]; $average = $total/10; //takes two values here as array values $values[] = "( '{$rows['courseid']}', '{$rows['marks']}') "; //takes two values here as array values $wastan[] = "Total:$total,Average: $average"; } for($x = 1; $x<=count($values); $x++){ //Here I force 10 subject to display together by unique student ID if(!(($i++) % 10)){ print $values[$x]; print "<hr>"; } esle{ print $values[$x]; } }
Quote:I want to inserting multiple array values in PHP
} else{ print $values[$x]; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)