I have a PHP file that contains a lot of "if" and "else" statements that determine what content a user sees (let's called this a block). I constantly have to modify this file (let's call it output.php), but it's a bit cumbersome with just a text editor.
What I want to do is use a simple web interface to modify output.php. I was thinking of using a PHP script that would break up output.php into chunks with links to forms where can I can modify each chunk. Here's an example:
output.php format:
<block A>
title = ...
description = ...
<block B>
title = ...
description = ...
...
script that modifies output.php
<Link to a form that I can use to edit block A, and save>
<Link to a form that I can use to edit block B, and save>
...
<buttons that let me add new blocks, etc.>
It's just a simple interface that lets me edit output.php. I was wondering if there's an easy method to do this in PHP?
Also, would anyone recommend that I start using databases to manage this data? It started off from just two blocks of data with an if/else statement, but now there's going to be up to a hundred blocks.