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

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

WBOY
Release: 2016-06-13 11:19:07
Original
923 people have browsed it

PHP--读取的数据怎么把小数点后面省略到
 读取出啦的例如 9.00   我想只显示9  小数点和后面的小数永远不显示


------解决方案--------------------
$d="4.5";
echo ceil($d)."

".floor($d)."

";

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template