<?php
function filename_safe($filename) {
$temp = $filename;
// Lower case
$temp = strtolower($temp);
// Replace spaces with a '_'
$temp = str_replace(" ", "_", $temp);
// Loop through string
$result = '';
for ($i=0; $i<strlen($temp); $i++) {
if (preg_match('([0-9]|[a-z]|_)', $temp[$i])) {
$result = $result . $temp[$i];
}
}
// Return filename
return $result;
}
?>





uhm… try this:
How do you remove characters such as “�” from this string, as well as the html code?
Just what I needed, cheers!
thanks