ID Name Total Rough Weight -6ren">
gpt4 book ai didi

php - 在数字中添加逗号

转载 作者:行者123 更新时间:2023-11-29 04:39:15 25 4
gpt4 key购买 nike

<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:&nbsp; &nbsp; &nbsp; &nbsp;";
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);

查看http://php.net/manual/en/function.number-format.php

关于php - 在数字中添加逗号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33295816/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com