Basitte olsa, bu işinize yarar herhal:
<?php
function parse_acronym($text)
{
$acronyms = array(
'seo' => 'Search Engine Optimation',
'sef' => 'Search Engine Friendly',
'php' => 'PHP: Hypertext Preprocessor',
// ...
);
$words = explode(' ', $text);
foreach ($words as $word)
if (isset($acronyms[$word]))
$text = str_ireplace($word, '<acronym title="' . $acronyms[$word] . '">' . $word . '</acronym>', $text);
return $text;
}
echo parse_acronym('seo dedikleri şey php olmadan olmaz. sef zaten başka bişiy..');
?>