• Курсы
  • Компилятор кода
  • Обсуждения
  • Цены
  • 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 anyone else experiencing this Sololearn issue?
0 Votes
Best language?
0 Votes
How do I keep myself motivated in coding
0 Votes
Anyone have song names? Comment your favorites here for a project im working on
1 Votes
Bro can you fix yt error?
0 Votes
Learn - multiple choice course questions display in one box making it impossible to continue
1 Votes
I want to know how to make an Payment App like what I need to learn I need some guidance
0 Votes
Bug in Completing AI Practice
0 Votes
Best Software for Windows Users to Convert RAR to ZIP
0 Votes