I will receive text from database, and i want to have some special items included there. Those i want to extract from the text.
Example data from database:
$A="Some text here some html tags like <br> and then the special element [link:id=1:type=txt]http:///www.a.b/c.txt[/link]someother text etc... maybe another special element";
I know i need to first seek for those special element with preg_gre, but those pattern thigns are too advanced for me. So How do i
Get "[link:id=1:type=txt]http:///www.a.b/c.txt[/link]" returned?
(Then i would like to replace the [link] element with some other php genereted text, eg. html link with some additional data.)
Preg_grep
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: