I'll try to explain this as best as I can, but what I am trying to do isn't exactly easy to explain
I have a base XML file (plugins.xml) In this file I have a root <plugins> node. Inside of that are <plugin> nodes. I have a form (deploy_form.php) which uses this XML sheet. To make it easy for people to add plugins to this application they can add some basic nodes to this xml sheet and the form will create a new checkbox option on the deploy_form.php file. Here is what code I have for the form:
My trouble however is on the next page after the user submits this form.
I need to create a new script tag for each new plugin they add. These are jQuery plugins and so they need to make new script tags one after another in a new html/php page. My application creates (among many other things) an index html or php file with default settings such as CSS, image directories, js, jQuery library etc. Here is some more PHP code:
I took out a lot of code so it makes it easier for you guys to help so there is a lot more options going into this but I need that final echo below to be repeated for every checked checkbox the user checked for their plugin choice. So, for example, lets say they choose 2 of 3 plugins. Then there would be a total of 2 <script> tags underneath the $jquery variable that needs to be written to a final .html or .php template.