<?php $inp= "12.345kk"; $number = 0; if (preg_match('/^([\d.]+)([kt]+)/', $inp, $matches)) { $number = $matches[1]; $multipliers = $matches[2]; $number *= 1000 ** strlen($multipliers); } echo $number;
You have javascript disabled. You will not be able to edit any code.