Thanks for that IceDank.
I have a variation on this question. I'll post it here because it might be of benefit to others.
I store all my texts for my germinating web site in MySQL and call them into HTML using PHP. Most of those texts contain links. This is no problem:
... Here's my text, stored in a MySQL table, and it contains a <a href="http://www.coollink.com">cool link</a>. ...
I generally feed these txts in large quantities into MySQL using <load data infile "my_text.txt" into table my_table;>
All no problem. But now I want to store all my URLs in a MySQL table, as you suggested, and call them into HTML using the PHP function you gave me. So the PHP function echo has to be included in the text that resides in the MySQL table. So what does the text look like that I load into the MySQL table? I tried this, quite simply:
... Here's my text, stored in a MySQL table, and it contains a call to a PHP function which will extract my link from another MySQL table and include it in the HTML, thus <a href="<?php $name = "cool link"; echo echo_link($name); ?>">cool link</a>. ...
This didn't work. Surprise! The link turned up in the HTML as "<?php $name =", so the PHP wasn't 'activated'. Ergo, the PHP wasn't parsed as PHP but just as a standard URL string within the double quotes.
I suspect I need to alter the syntax and escape a few things. Any suggestions? The combination of HTML and PHP within MySQL is making my head spin.
Once again ... thanks very much
Norman