ok, here is one tricky question.
i have written the following udt (this is an excerpt, there is more in it):
Code: Select all
function begriff_to_include($begriff) {
$d1 = array("ä" , "ö", "ü", "ß", "Ä", "Ö", "Ü", "é", "ó", "í", "ú", "á", " ", "," );
$d2 = array("ae" , "oe", "ue", "ss", "Ae", "Oe", "Ue", "e", "o", "i", "u", "a", "-", "");
$begriff_n = str_replace($d1, $d2, $begriff);
$begriff_n = strtolower($begriff_n);
return $begriff_n;
}
$title = $params['begriff'];
echo $title;
$dest = begriff_to_include($title);
echo $dest;
what it does is pretty straight forward. it converts the word "Acné" to "acne". works like a charm so far.
but i want to use that udt more than once in a page. as it is right now i will get an error because the function begriff_to_include() gets redeclared. so i thought about including the function like that:
Code: Select all
include_once ("uploads/inc/functions.php");
i have no clue why it behaves like that. so i will be really thankful if someone has an answer to this.
cheers,
chris
