Witam
Czy jest ktoś kto pomógł by przerobić ten fragment kodu aby zmieniał literki z ogonkami na literki bez ogonków

(ą -> a ć -> c itd...)
<?php
function get_text_link($text) {
global $CONF, $DB, $FORM, $LNG, $MSK; $text = str_replace(array('and','&', '&', ''', '`', ',', '?', '/', '', '#', '@', '!', ' , '^', '%', '*', '(', ')', '_', '+', '=', '~', '1', '2', '3', '4', '5', '6', '7,', '8', '9', '0', ';', ':', '"', '.', '-'), '', $text); for ($i = 0;$i < $count_chars;$i++) {
$chr = $text{$i};
$ord = ord($chr);
if ($ord < 32 or $ord > 126) {
$chr = " ";
$text{$i} = $chr;
}
}
$count_words = $count_chars = null;
foreach ($ex_text as $word) {
$count_words++;
$count_chars = $count_chars + strlen($word); if ($count_chars <= 30)if ($word)$new_text .= '-' . $word;
}
return trim($new_text, "-"); }
function news_types() {
global $CONF, $DB, $FORM, $LNG, $MSK; $new_os = null;
$result = $DB -> query("SELECT cat, cat_str, subcat, subcat_str FROM {$CONF['sql_prefix']}_cats WHERE cat_os_str = '{$CONF['news_tab']}' and subcat_str !='' ORDER BY cat_str", __FILE__, __LINE__);
while ($row = $DB -> fetch_array($result)) {
$MSK['tip_values_2'] .= "<input name=\"news_type[]\" type=\"checkbox\" value=\"" . $row['cat_str'] . "_" . $row['subcat_str'] . "\"" . $MSK[$row['cat_str'] . "_" . $row['subcat_str']] . ">{$MSK['cat']} >> {$MSK['subcat']}<br>";
$MSK['tip_values'] .= "<OPTION value=\"" . $row['cat_str'] . "_" . $row['subcat_str'] . "\"" . $MSK[$row['cat_str'] . "_" . $row['subcat_str']] . ">{$MSK['cat']} >> {$MSK['subcat']}</OPTION>";
}
}
?>
Ten post edytował Zbych21 2.05.2009, 22:56:01