Hey everyone, new to PHP, and having issues with this, and none of my PHP buddies are online to help me out, so I was hoping someone on here might be able to tell me real quick. I don't think what I'm trying to do is hard. Or maybe it is. At the bottom of the code, there's a chunk that makes a "text segement" for a longtext field in the database. I need to make it so that it is a variable that I can loop.

Can anyone help me format it to a variable that I can loop? Sounds simple to me, but I can't figure it out, but I've only been at PHP for a few weeks, so I'm still trying to figure it all out.