Most of the time, my forms are not in a set format and I have to place things in custom ways every time. I would also rather design the form in HTML, not PHP. This allows the form to be edited by someone who doesn't know PHP intimately.
I agree. There are other methods for generating dynamic HTML forms using PHP and JavaScript which would seem easier to code, and easier for someone less familiar with PHP to understand.
Sometimes it's not possible to create the form at design time in the HTML. An example could be a shopping cart program where the administrator can add options to products. In situations like these, the form fields have to be created dynamically.
If you just need a static form, then I agree, this would be overkill.
I also have to give kudos for the object-oriented programming. Most PHP developers are procedural programmers.
If you just need a static form, then I agree, this would be overkill.
I also have to give kudos for the object-oriented programming. Most PHP developers are procedural programmers.
Line 55 ( getNext() ) method:
move the latter part of the line ( return false; ) onto a new line, uncommenting it.
Also a another problem was:
remove the "." from the first line of the getTableOfElements_1/2() method so the $outp variable is declared and not concatenated to.
Apart from that, cheers for the code!