I’m using PHP to echo a content stored on my database. The content is a DIV carrying any type of data.
The problem is that I don’t know the ID and I have some problems with these DIVs if I try to display them more than once.
So, the idea is to modify the DIV id each time I’d like to display them.
Something like this:
<?php modify_div_id($data,"id-456"); ?>
How would I go about doing this?
This is ugly, but i think it works.
The best way to go is to use an XML parser to change the attribute.
Edit: the function assumes the div to already have an id attribute.
Edit #2
It seems to be working!