ipvrf Posted August 11, 2010 Share Posted August 11, 2010 $to = $notifyemail; $from = "[email protected]"; $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"; 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; 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; ?> 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
Archived
This topic is now archived and is closed to further replies.