Re: Running PHP Function from ECHO'd MySQL Data
| From: | Erik J. Barzeski | Date: | Fri, 23 Nov 2001 17:51:32 +0000 |
| Subject: | Re: Running PHP Function from ECHO'd MySQL Data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75594@lists.php.net to get a copy of this message | ||
Hi,
I've come upon a stumbling block and I'd like to resolve it the best way. I
could probably think of a few work-arounds, but I'd rather not hack it if
there's an elegant solution...
I have a function, let's call it "do_stuff" that I include() in my head.inc
file, which every page on the site include()s. So the function is available.
Now, I have a bunch of articles in a MySQL database. The article "body" (a
blob) has minimal HTML, like <p> and </b> and so on. It also contains stuff
like this:
<?=do_stuff("item1.jpg", "something else here");?>
Now... How can I get PHP to process these commands? Obviously echo is not
the way to go, since that's post-processing... What's the most elegant
solution?
Please email me off-list as I get the digest and won't see any answers for
quite some time. Feel free as always to CC the list of course.
P.S. I looked around quickly and didn't find the solution, so yes, this
email to the list is pretty early in my "research" stage.
Thanks!
--
Kindest regards,
Erik J. Barzeski
Give a man a fish, he'll eat for a day. Give him
the Internet and he won't bother you for weeks.
*******************************************************************
Email: erik@(anything below)
AIM: iacas ICQ: 8186546
http://barzeski.com/ http://weims.net/
http://techstra.net/ http://cocoadevcentral.com/
http://soundsetcentral.com/ http://applescriptcentral.com/
*******************************************************************