Use it with a slight change
   
   
  <?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);

echo trim($filename).".html";
?>



Bob <[EMAIL PROTECTED]> wrote:
  Hi Wretha,
This maybe a more elegant solution:

$title = "Bob <123> #*&%$£! to the Say's it and or with Hello too also a if to";
echo $title."

";

$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









                
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

[Non-text portions of this message have been removed]






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/
 


Reply via email to