Home  >  Article  >  Backend Development  >  PHP-读取的数据如何把小数点后面省略到

PHP-读取的数据如何把小数点后面省略到

WBOY
WBOYOriginal
2016-06-13 12:50:07969browse

PHP--读取的数据怎么把小数点后面省略到
 读取出啦的例如 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