ballhogjoni Posted April 10, 2007 Share Posted April 10, 2007 is there a function like rawurlencode() that will strip the dashes out of a phone number? 555-555-5555 into 5555555555 Link to comment https://forums.phpfreaks.com/topic/46374-solved-is-there-a-function-like-rawurlencode-that-will/ Share on other sites More sharing options...
fert Posted April 10, 2007 Share Posted April 10, 2007 $num=str_replace("-","",$num); Link to comment https://forums.phpfreaks.com/topic/46374-solved-is-there-a-function-like-rawurlencode-that-will/#findComment-225559 Share on other sites More sharing options...
kenrbnsn Posted April 10, 2007 Share Posted April 10, 2007 Didn't you ask this at least once before? The function is str_replace() <?php $test = '555-555-5555'; $test2 = str_replace('-','',$test); echo $test2; ?> Ken Link to comment https://forums.phpfreaks.com/topic/46374-solved-is-there-a-function-like-rawurlencode-that-will/#findComment-225561 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.