也许这个问题是如此基本,我无法找到它解释。从php获取%的百分比与php
我有一个2值的表。说明|从mysql中回荡的估值。 我正在寻求获取指示的百分比值(%)作为估值。 即10个约会/ 5个销售= 50%的转换率。 总和将销售/任命x 100 =%
任何想法如何将这个回声到我的html表''百分比'列?
$query = "SELECT * FROM office_figures2016";
$result = mysqli_query($conn, $query);
while($office_figures2016=mysqli_fetch_assoc($result)){
echo "<tr>";
//changes date to english format from a time stamp
echo"<td>".$office_figures2016['id_why']."</td>";
echo"<td>".date('d-m-Y',strtotime($office_figures2016['date_figures']))."</td>";
echo"<td>".$office_figures2016['valuations']."</td>";
echo"<td>".$office_figures2016['instructions']."</td>";
echo"<td>".$office_figures2016['percentage of above']."</td>";
[MySQL Calculate Percentage]可能重复(https://stackoverflow.com/questions/15746749/mysql-calculate-percentage) – Sand
你有你需要的一切,你知道计算是什么,那么究竟是什么问题 – RiggsFolly
我想你要找的答案是[here](https:// stacko verfusion.com/questions/15746749/mysql-calculate-percentage) – Sand