Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Generieren Sie eine Tabellenzeile mit -Werten aus DB PHP

Versuchen Sie:

$facSecComponentID = array();
$facSecComponent = array();
$facSecComponentType = array();
$facSecComponentThickness = array();

while ($row = mysqli_fetch_array($data)) {
    $facSecComponentID[] = $row['facility_section_components_id'];
    $facSecComponent[] = $row['roof_component_id'];
    $facSecComponentType[] = $row['roof_component_type_id'];
    $facSecComponentThickness[] = $row['component_thickness'];
}

$numItems = mysqli_num_rows($result);

for($i=0;$i<$numItems;$i++){
    echo "<tr>";
    echo "<td>{$facSecComponent[$i]}</td>";
    echo "<td>{$facSecComponentType[$i]}</td>";
    echo "<td>{$facSecComponentThickness[$i]}</td>";
    echo "</tr>";   
}