PHP remove first zeros

xmoso

New Member
Want to remove all \[code\]0\[/code\] placed at the beginning of some variable.Some options:[*]if \[code\]$var = 0002\[/code\], we should strip first \[code\]000\[/code\] (\[code\]$var = 2\[/code\])[*]if \[code\]var = 0203410\[/code\] we should remove first \[code\]0\[/code\] (\[code\]$var = 203410\[/code\])[*]if \[code\]var = 20000\[/code\] - do nothing (\[code\]$var = 20000\[/code\])What is the solution?
 
Back
Top