Home  >  Article  >  Backend Development  >  PHP读取的数据怎么把小数点后面省略到

PHP读取的数据怎么把小数点后面省略到

WBOY
WBOYOriginal
2016-06-23 14:04:151023browse

 读取出啦的例如 9.00   我想只显示9  小数点和后面的小数永远不显示


回复讨论(解决方案)

$d="4.5";
echo ceil($d)."

".floor($d)."

";

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn