update
I have made this table: I have 2 array's UGentArray and InternshipsArray. How can I set these in my table? instead of "Row column 1 data" and "Row column 2 data". My question is: I want the values from UgentArray and InternshipArray as 2 columns under Each title UGentID and Internships
enter code here// Make table and display on screen.
$tbl_header = array();
$tbl_header[] = array("data" => "UGentID");
$tbl_header[] = array("data" => "Internships");
$tbl_row = array();
foreach($studentUGentID as $key => $value) {
for($i = 0; $i<count($value); $i++) {
$tbl_row[] = $value[$i]['value'];
}
}
$tbl_row[] = "Row column 2 data";
$tbl_rows = array();
$tbl_rows[] = $tbl_row;
$html = theme_table($tbl_header,$tbl_rows);
return $html;![enter image description here][1]
Without having an example of the data you are starting with it is difficult to give you exact code to solve your problem.
In general the best way to built tables in Drupal is like this:
As I said without knowing what is in
$studentUGentID
and$internships
I cannot help further.With sample data I could help you more.