By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,707 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Parser question

P: n/a

I would like to make a simple parser which should work as follows:

this is my text {link:href=mypage,link_text} some other text


This is a string I would like to store in the database and then load
in php. Later I would like to insert some other text between { and }
signs. I would have a function name "link" with one parameter passed.
Return value of this function would be a string to replace that one
between { and } signs.

function link($params)
... some logic ...
return string;

This function will return something like <a

Is there any easy way to do it?

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.