Code: Select all
function ctype($l) { //Returns TRUE if link only contains valid signs.
$nl = $l; //yes, this is "L"'s
$keys = array("æ","ø","å","Æ","Ø","Å","å","ø","Æ","æ","Ø","Å","@", "£", "¤", "%", "&", "/", "\\", "^", "*", "§", "½", ".", ",", ":", ";", "'", "¨", "~", "[", "]", "{", "}", "´", "`", "@", "!", '"', "'"," ");
$array = array_fill_keys($keys, "-");
$nl = strtr($l,$array);
if ($nl != $l)
return false;
else return true;
}Otherwise it works perfectly fine.
What is it about the æøå signs? As you can see, I've tried in some different ways.