Hi Wretha,
This maybe a more elegant solution:
<?php
$title = "Bob <123> #*&%$£! to the Say's it and or with Hello too also a if to";
echo $title."<br /><br />";
$filename = strtolower($title);
$filename = preg_replace("/[^a-z ]/", "", $filename);
$remove = array('to','the','it','and','or','with','too','also','a','if');
$filename = explode(" ", $filename);
$filename = array_diff($filename, $remove);
$filename = implode(" ", $filename);
$filename = preg_replace("/[ ]+/", "_", $filename);
echo trim($filename).".html";
?>
Bob E.
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/