Quote:
|
Originally Posted by sneakyimp
|
I suspect that would have no impact, as the OP stated that there were duplicate
section headers, not duplicate item IDs.
As far as a function to rename sections, I don't know of one off-hand. I'd be more inclined to do some sort of search for duplicates and just raise an error if they are found, rather than arbitrarily trying to fix what may be invalid data that should be manually corrected. You could do a
preg_match_all('/\[[^\]]+\]/', $text, $matches);, and then see if count($matches) == count(array_unique($matches)).