programming-examples/php/String/PHP script to remove all leading zeroes from a string.php

5 lines
74 B
PHP
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<?php
$x = '000547023.24';
$str1 = ltrim($x, '0');
echo $str1."\n";
?>