The desired result first, that’s what I want as pdf.
I use wkhtml in blank application.
But I have a problem with multi foreach in secound level. I get an error if I use this
$content .= ‘’.$values[‘geb_id’].’’;
Error:
And this is the part with entire foreach so far:
foreach($report as $key => $value){
if($key==0 || !empty($gebaeude_new) ){
$content .= ‘’;
$content .= ‘’.$value[‘geb_name’].’’;
$content .= ‘’;
}
/*
// NOT WHAT I WANT, BUT GOES
foreach($value as $key2 => $values){
if($key2!="geb_name"){
$content .= '<td scope="col" class="dontBreak" style="color:blue">'.$values.'</td>';
}
*/
// IF I USE $value['geb_id'] THAN LISTS THE ROOMS AS OFTEN AS THERE'RE ROOMS IN AN APPARTMENT. IT'S NOT WHAT I WANT
// IF I USE $values['geb_id'] I GET AN ERROR
foreach($value as $key2 => $values){
$content .= '<tr>';
$content .= '<td scope="row" class="dontBreak">'.$values['geb_id'].'</td>';
$content .= '<td scope="row" class="dontBreak">'.$values['geb_name'].'</td>';
$content .= '<td scope="row" class="dontBreak">'.$values['nutz_id'].'</td>';
$content .= '<td scope="row" class="dontBreak">'.$values['nutz_einheit'].'</td>';
$content .= '<td scope="row" class="dontBreak">'.$values['raum_id'].'</td>';
$content .= '<td scope="row" class="dontBreak">'.$values['raum_name'].'</td>';
$content .= '</tr>';
}
}
Has someone an idea?