alohatofu Posted May 15, 2007 Share Posted May 15, 2007 hello I have this number 0030007 I would like to take away the first 2 zeros ONLY and display me the last 5 digits ONLY. I've tried using /[1-9]{5}/ but it doesn't work Can somone please help? Thanks Link to comment https://forums.phpfreaks.com/topic/51443-need-help-on-getting-rid-of-0/ Share on other sites More sharing options...
Wildbug Posted May 15, 2007 Share Posted May 15, 2007 preg_match('/$0*(\d{5})/',$var,$match); echo $match[1]; Link to comment https://forums.phpfreaks.com/topic/51443-need-help-on-getting-rid-of-0/#findComment-253579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.