Removing Leading Zeros in PHP
It’s pretty easy to do, many thanks to laserlight at phpbuilder:
$var = ltrim($var, '0');
If there’s more than one zero use the following:
$value = 003; $value = intval($value);
It’s pretty easy to do, many thanks to laserlight at phpbuilder:
$var = ltrim($var, '0');
If there’s more than one zero use the following:
$value = 003; $value = intval($value);
No comments yet.
RSS feed for comments on this post. TrackBack URL