<html> <head> <title>Rough Diamond
Information</title> </head>
<body>
<?php
mysql_connect("localhost","root","");
mysql_select_db("basic");
$order = "select * from calculator ";
$result=mysql_query($order);
echo "Rough Diamonds Information: ";
echo "<a href='home.html'>Go to main page <br><br>";
?>
<table border="1" style="width:50%">
<tr>
<th><b>ID</b></th>
<th><b> Name</b></th>
<th><b> Total Rough Weight</b></th>
<th><b>One Carat Price</b></th>
<th><b>Dollar Rate</b></th>
<th><b>Payment Days</b></th>
<th><b>Total Payment</b></th>
</tr>
<?php while($row = mysql_fetch_array($result) ) {
echo "<tr>
<td>".$row['id']."</td>
<td>".$row['name']."</td>
<td>".$row['total_wt']."</td>
<td>".$row['crt_price']."</td>
<td>".$row['dollar_rate']."</td>
<td>".$row['pay_day']."</td>
<td>".$row['total_price']."</td>
</tr>";} ?>
</body>
</html>
最佳答案
使用number_format($number);
。
关于php - 在数字中添加逗号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33295816/