Advertisement
peterurfi

Untitled

May 14th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.57 KB | None | 0 0
  1.     public static $chars = array(
  2.                             'á' => 'a',
  3.                             'é' => 'e',
  4.                             'í' => 'i',
  5.                             'ó' => 'o',
  6.                             'ö' => 'o',
  7.                             'ő' => 'o',
  8.                             'ú' => 'u',
  9.                             'ü' => 'u',
  10.                             'ű' => 'u',
  11.                             'Á' => 'A',
  12.                             'É' => 'E',
  13.                             'Í' => 'I',
  14.                             'Ó' => 'O',
  15.                             'Ö' => 'O',
  16.                             'Ő' => 'O',
  17.                             'Ú' => 'U',
  18.                             'Ü' => 'U',
  19.                             'Ű' => 'U',
  20.                             ' ' => '-',
  21.                             '.' => '-',
  22.                             '?' => '-',
  23.                             '!' => '-',
  24.                             '&' => '-',
  25.                             '#' => '',
  26.                             '<' => '',
  27.                             '>' => ''
  28.  
  29.                            );
  30.    
  31.     function GetUriTitle($title)
  32.     {
  33.         return strtr($title, self::$chars);        
  34.     }
  35.    
  36.     function processUri() {
  37.          $REQUEST_URI = $_SERVER['REQUEST_URI'];
  38.          $array = explode("/",$REQUEST_URI);
  39.          $num = count($array);
  40.          $url_array = array();
  41.  
  42.          for ($i = 1 ; $i < $num ; $i++)
  43.          {           
  44.                 $return[$i] = $array[$i];  
  45.          }
  46.         return $return;
  47.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement