Jump to content

Adding a link dynamically


Solarpitch

Recommended Posts

Hey Guys,

 

I'm querying a database that is going to return a html page. In this page I'm going to define content areas with a class.

 

eg:

<div class="category"></div>

 

Anywhere I have this class in the html code, I want to dynamically insert a link into it. So when I retrieve the code from the database, I need the code to check for this tag (class="category") and add a standard link (<a href="..">Add new Category</a>) 

 

Not 100% sure whats the most efficient way to go about this.

Link to comment
https://forums.phpfreaks.com/topic/231793-adding-a-link-dynamically/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.