「php入門」ceil()とround()のサンプル
1.ceil()で小数点以下を切り上げ
ceil(725.58);
結果:726
2.round()で四捨五入
①1の位
round( 351,-1);
結果:360
②10の位
round( 452,-2);
結果:500
Coding Changes the World
1.ceil()で小数点以下を切り上げ
ceil(725.58);
結果:726
2.round()で四捨五入
①1の位
round( 351,-1);
結果:360
②10の位
round( 452,-2);
結果:500