in reply to replace the first tag

Erm ... maybe your code could remember whether it already printed a <p> tag or not and print the "<con>" only the first time. And then print "</con>" at the very end of the file. Maybe?

Jenda
Enoch was right!
Enjoy the last years of Rome.