Ok. I was able to get the first step done. With the code below I can get all my titles, remove white spaces, remove uppercase letters, and any punctuation that is not url standard (all that I could think of).
$patterns[0] = '/ /';
$patterns[1] = '/:/';
$patterns[2] = '/\?/';
$patterns[3] = '/\'/';
$patterns[4] = '/\"/';
$patterns[5] = '/,/';
$patterns[6] = '/--/';
$patterns[7] = '/\./';
$patterns[8] = '/\!/';
$patterns[9] = '/\\/';
$patterns[10] = '/\//';
$replacements[10] = '-';
$replacements[9] = '-';
$replacements[8] = '';
$replacements[7] = '-';
$replacements[6] = '';
$replacements[5] = '';
$replacements[4] = '';
$replacements[3] = '';
$replacements[2] = '';
$replacements[1] = '-';
$replacements[0] = '-';
ksort($patterns);
ksort($replacements);
echo strtolower(preg_replace($patterns, $replacements, $info['title']));
Now, with this code I can get: italy-wins-world-cup-for-the-fourth-time
I also created a new db column called UrlTitle.
My problem now is: How do I apply this code to populate this new column with the thousands of title rows I have in my db?
Thanks again for the help.
Tim