ltrim():- 

The ltrim() function removes whitespace or other predefined characters from the left side of a string.

code:-

<?php
$num = '0025.10';
$str = ltrim($num, '0');
echo $str."\n";
?>

output:-

25.10

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post