WRITE SMALL PROJECTS CLEAN
Some days ago, when I tried to add features to this blog I wrote more than a year ago, I was confused with the code I found. I seperated the logic that does the data aggregation but in the "view" there was just a messed up php-html-mix and it was crappy to read and even crazier to edit. It took a long time to fully understand what that code was doing. Thats because I didn't really care to write clean php code. I was aware of how to do it in C# but all the php projects I needed to maintain in the past were written that mixed up kind of way.
The additional code, of course, got a decoupled style but I was not splitting up the logic from the view entirely, yet. Thats what needs to be done and I better build objects for the blog items instead of managing them from an array. Object held posts are more easy to maintain and to render as they can render themselves. This will make the view more easy to read and to edit.
Additionaly I will need some additional logic to render the preview or the whole post. This may be just a little if statement but it becomes unreadable as the if statements stack upon each other. So I will have to do a little more decoupling.
As you see, you will have a lot of trouble when not planning your software in any kind of way. Even if the project is small and you may never touch it again: WRITE IT CLEAN. At least it will be a good practice.