×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Jing Tai Piao
Added: Oct 15, 2012 5:22 AM
Views: 25
Tags: no tags
php convert percentage to float
  1. <?php
  2. $a = "20.544545%";
  3. echo (float)$a/100;
  4. ?>

1 comment

Lionel COTE 2 years ago
Is (float) neccessary in PHP ?!?

Write a comment