小数点以下の不要な0を削除する


小数点以下の不要な0を消して表示したい場合、いくつか方法がありますがfloatvalを使用することができます

echo floatval(1.0000); // 1
echo floatval(1.2345000); // 1.2345