Searching and inserting

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sharpy
Forum Newbie
Posts: 1
Joined: Mon Jun 08, 2009 7:24 pm
Location: Toledo, OH

Searching and inserting

Post by sharpy »

I use php and mysql to generate new webpages for my site... what i would like to do is pull information from my mysql database and wherever there is a certain pattern, i would like to insert HTML code before and after that pattern. An example would be for creating a link to say google wherever there is the term google in the text. Hopefully you understand what i'm asking.

an example would be...
before the search and insert...
"why don't you try using google for that?"
after the search and insert...
"why don't you try using <a href=http://www.google.com> google </a> for that?
Post Reply