When I said generated dynamically, I wasn't asking about the links. I'm aware that the text must be parsed for those. What I was asking about was the list.
Anyway.... here's how I think it should work...
Here is some PHP code for your page;
Just fill in the blanks as you wish:
PHP Code:
<?php
$words = array(
array('apple','http://apple.com'),
array('orange','http://orange.com'),
array('banana','http://banana.com')
); //setup your words/urls
//copy pattern above
//last one needs no comma
$f = file_get_contents('**thispage***.php'); //get contents of this page
list($f,$null) = explode('/*END*/ ?>',$f); //take of this php from top
list($f,$null) = explode("/n",$f); //get rid of extra line
foreach($words as $word) {
$f = str_replace($f,$word[0],'<a href="'.$word[1].'">'.$word[0].'</a>');
}
//replace all words with links
echo $f; //output page
die(); //end script execution
//and don't output rest of page
//it's already output by script
/*END*/ ?>
<html>
the rest of your page goes here
whatever you want
Oh, and you can't use any more PHP on the page
or it would get complex
there are ways around it, though
but let me know if you need that,
and we cant work it out
Also, this would cause issues if
the keywords are in the code
like if you used 'div' as a keyword
it would parse <div> to be a link
Bookmarks