• Курсы
  • Компилятор кода
  • Обсуждения
  • Цены
  • Teams
Menu
0

Convert int to float in php

how do i convert int to float in php like 4.0+4.0 should be 8.0 display

phpdata-typestype-conversionfloatint
23rd Dec 2018, 7:28 AM
Vikraant
1 ответ
+ 3
You can use floatval to make sure the calculation done in float, then use number-format for the display http://php.net/manual/en/function.floatval.php http://php.net/manual/en/function.number-format.php
23rd Dec 2018, 7:54 AM
Taste
Taste - avatar

Часто задают такие вопросы?

Учитесь эффективнее, бесплатно:

  • Введение в Python

    7.1M учащихся

  • Введение в Java

    4.7M учащихся

  • Введение в C

    1.5M учащихся

  • Введение в HTML

    7.5M учащихся

Смотреть все курсы
Актуальное сегодня
Is it possible to convert .zip file to apk? If yes, how??
1 Votes
Pointers cpp
2 Votes
I think the heart system is ridiculous, 5 hearts that refill after like 5 hours? That is really just crazy to me.
1 Votes
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
0 Votes
Why can’t I use double “ in python?
0 Votes
Is pro worth the money ?
1 Votes
2 cases not correct what's the problem
1 Votes
Drawing images in java
2 Votes
You’re free to give me your advice! 🚨
0 Votes
Coding for Cybersecurity
0 Votes