Advertisement
Guest User

fixnope

a guest
Feb 25th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. $nope = $_GET['nope'];
  2. $nope = fix($nope);
  3. echo "<br>".$nope;
  4.  
  5.  
  6. function fix($str){
  7. $num = '';
  8. for ($i = 0; $i < strlen($str); $i++) {
  9. if (is_numeric($str[$i])) {
  10. $num .= $str[$i];
  11. }
  12. }
  13. if(substr($num, 0, 2) == "08") { $num = "628".substr($num, 2, strlen($num)-2); }
  14. return $num;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement