Mega Code Archive

 
Categories / Php / Data Type
 

Using typecasting to convert numbers to strings

<?php      $i = 123456;      $f = 98765.567;           echo "\$i = " . (string)$i . "\n";      echo "\$f = " . (string)$f . "\n";  ?>