将函数包装到HTML表中

时间:2016-03-23 16:08:34

标签: php html json html-table

我是HTML和PHP的新手。有什么方法可以将它包装在HTML表中吗?

This is what the output currently looks like

This is how I want it to look like

这是代码目前的样子:

$measurement = json_decode($orders['measure']);

for($mcounti=0; $mcounti<15; $mcounti++){
    $print_content .= '<div class="">';
    for($mcountj=0; $mcountj<4; $mcountj++){
        $print_content .= '<div class="size' . $mcountj . '">';
        if(isset($measurement[$mcounti])){
            if(trim($measurement[$mcounti][$mcountj]) != ""){
                $print_content .= $measurement[$mcounti][$mcountj];
            }else{
                $print_content .= "-";
            }
        }
        //$print_content .= isset($measurement[$mcounti]) ? $measurement[$mcounti][$mcountj] : '00';
        $print_content .= '</div>';
    }
    $print_content .= '</div>';
}

$print_content .= '</div>';

0 个答案:

没有答案