Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/04/2010, 10:23
maxwellxp
 
Fecha de Ingreso: abril-2010
Mensajes: 143
Antigüedad: 14 años
Puntos: 0
Respuesta: quitar notacion cientifica php mysql

no, sigue haciendo lo mismo...uso tales valores:
999999999999999 + 9.9 = 1.0E+15
Código PHP:
Ver original
  1. <?php
  2. if(isset($_POST['algo'])) {
  3. $num1 = $_POST['num1'];
  4. $num2 = $_POST['num2'];
  5. $res = $num1 + $num2;
  6. $res = (string)$res;
  7. }
  8. ?>
  9. <body>
  10. <form id="form1" name="form1" method="post" action="">
  11.   <label>
  12.   <input type="text" name="num1" id="num1" />
  13.   </label>
  14.   <p>
  15.     <label>
  16.     <input type="text" name="num2" id="num2" />
  17.     </label>
  18.   </p>
  19.   <p>
  20.     <label>
  21.     <input type="submit" name="algo" id="algo" value="Enviar" />
  22.     </label>
  23.     Resultado: <?php if(isset($_POST['algo'])) { echo $res; }  ?>
  24.   </p>
  25. </form>
  26. </body>
  27. </html>