ipvrf Posted August 11, 2010 Share Posted August 11, 2010 $to = $notifyemail; $from = "xxx@xxx.com"; $subject = "[ $rawticket ] Random $notifytype Notification"; Currently the output is an email with a total of 15 numbers, i.e. SUBJECT: [ 000000001718989 ] Random $notifytype Notification I want to remove the 0's Would something like this work or is this not possible? "[ (substr($rawticket,9)) ] Random $notifytype Notification"; Quote Link to comment https://forums.phpfreaks.com/topic/210494-substr-question-and-truncating-a-variable/ Share on other sites More sharing options...
Exabyte Posted August 11, 2010 Share Posted August 11, 2010 $rawticket = (int)$rawticket; Quote Link to comment https://forums.phpfreaks.com/topic/210494-substr-question-and-truncating-a-variable/#findComment-1098309 Share on other sites More sharing options...
sasa Posted August 12, 2010 Share Posted August 12, 2010 <?php $test = '000000001718989'; $test = ltrim($test, '0'); echo $test; ?> Quote Link to comment https://forums.phpfreaks.com/topic/210494-substr-question-and-truncating-a-variable/#findComment-1098436 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.