Sorry for the delay. I’ve just seen this. By the way if you click the reply next to the message the person will be informed or you can notify the person by including their username with an @ symbol.
Anyway, I appreciate what you are trying to achieve with the code you have mentioned but we need to see the whole picture. Where are you including this code? and where are the articles? are they in your resources folder or elsewhere on the web? What are you trying to do in the long run?
Hopefully I can help but I need to know a little more.