storing and parsing tokens in MySQL

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm writing a routine that fetches HTML content from a database. I'd
like to be able to include tokens in the content, that are parsed
before printing. The tokens are optional, so looking for and parsing
them isn't always necessary.

An example would be ...
$fullURI ='someURL';

while ($contentrow = mysql_fetch_assoc($getcontentresult)) {
           $titletag = $contentrow["titletag"];
           $desctag = $contentrow["desctag"];
           $keywtag = $contentrow["keywtag"];
           $content = $contentrow["content"];   //< contains token


// parse the tokens in $content variable
$search = array('');
$replace = array("$fullURI");
$content = str_replace ($search,$replace,$content);

My question is, is there a more efficient way to do this? I planned to
create roughly a dozen tokens, so the $search/replace arrays would be
larger. This is a small part of a fairly complex script, and I'm
striving to make it as resource efficient as possible.

Site Timeline