ソース
<?php function smarty_block_keyword($params, $content, &$smarty) { if (is_null($content)) { return; } if ( $params['list'] == NULL ) { return $content; } $keywords = $params['list']; $_output = $content; foreach ( $keywords as $key => $value ) { $_output = ereg_replace ( $key, '<a href="'.$value.'">'.$key.'</a>', $_output ); } return $_output; } ?>