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

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

WBOY
Release: 2016-06-23 14:04:15
Original
1047 people have browsed it

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


回复讨论(解决方案)

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

".floor($d)."

";

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