SHARE
TWEET

Untitled

nik_crimea Aug 17th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ($str == '')
  2.         return '';
  3.     do {
  4.         $str = str_replace("  ", " ", $str, $count);
  5.         $f = $count === 0 ? false : true;
  6.     } while ($f === true);
  7.     if ($str == '' or $str == ' ')
  8.         return '';
  9.     if ($str[0] == ' ')
  10.         $str[0] = '';
  11.     $str[0] = $str[0] == ' ' ? '' : $str[0];
  12.     $last = strlen($str)-1;
  13.     $str[$last] = $str[$last] == ' ' ? '' : $str[$last];
  14.     $str = strtolower($str);
  15.     $str = str_replace(" ", "-", $str);
  16.     return $str;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top