Text
|
|
|
|
<?php function dict($string)
{
return preg_replace('/[dict](.*?)[/dict]/','\1 <font size=1>[<a href=http://www.dictionary.com/search?q=\1>?</a>]</font>',$string);
}
?>
|
|
|
Usage Example
|
$string="[dict]foo[/dict]";
echo dict($string);
outputs foo <font size=1>[<a href=http://www.dictionary.com?search?q=foo>?</a>]</font>
|
|
|
Rate This Script
|
|
|
|