If I have a string
00020300504 00000234892839 000239074
how can I get rid of the leading zeroes so that I will only have this
Don't know why people are using so complex methods to achieve such a simple thing! And regex? Wow!
Here you go, the easiest and simplest way (as explained here: https://nabtron.com/kiss-code/ ):
$a = '000000000000001'; $a += 0; echo $a; // will output 1