![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 10 Pomógł: 0 Dołączył: 25.12.2007 Ostrzeżenie: (0%) ![]() ![]() |
mam taka funkcje do zmiany tytulu danego artykulu na PERMALINKA. Czyli jesli jest tytuł "Zośka poszła spać" to zmmienia na zoska-poszla-spac. Problem tkwi w tym, że nie wiem jak zmienić litery ęśąć itp na esac itp . $result = preg_replace('/ś/', ' s', $result); nnie działa;/
public function getStrippedTitle() { $result = strtolower($this->getTitle()); // strip all non word chars $result = preg_replace('/\W/', ' ', $result); // replace all white space sections with a dash $result = preg_replace('/\ +/', '-', $result); // trim dashes $result = preg_replace('/\-$/', '', $result); $result = preg_replace('/^\-/', '', $result); return $result; }
Powód edycji: dodałem tag (cysiaczek)
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 1 657 Pomógł: 125 Dołączył: 29.04.2006 Ostrzeżenie: (0%) ![]() ![]() |
$result = str_replace('ś', 's', $result);
i tak z pozostałymi. btw. Jaki to ma związek z frameworkami? Ten post edytował radex_p 24.05.2008, 12:10:18 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 16.10.2025 - 20:58 |