最初のカラムを除いてほとんどすべてが正常に動作していますが、データの前に "1"があります。私はmysqlデータベースからhtmlテーブルにデータを取得しようとしています
私の出力は次のとおりです。
最初の列、すなわち強度に1が付いています。私のデータベースのデータはただ1桁の数字です。
<?php
include 'index.php';
$sql = "SELECT t.strength, t.timeslot, t.cust_phno , c.fname, c.lname FROM tables t,customer c WHERE t.cust_phno = c.cust_phno";
$result = mysqli_query($con,$sql);
?>
<div id="view">
<table style="width:90%">
<thead>
<tr>
<th> Table Strength </th>
<th> Time Slot </th>
<th> Customer Phone Number</th>
<th> Customer Name </th>
</tr>
</thead>
<tbody>
<?php
while($array = mysqli_fetch_assoc($result)) {
echo
print "<tr> <td>";
echo $array["strength"];
print "</td> <td>";
echo $array["timeslot"];
print "</td> <td>";
echo $array["cust_phno"];
print "</td> <td>";
echo $array["fname"];
print " ";
echo $array["lname"];
print "</td> </tr>";
}
?>
</tbody>
</table>
は印刷されませエコー。 –