I have an issue with my while loop that I'm using. I'm trying to display several modules on my webpage, each of them are stored within my database.
I run the following mysql query.
$modules = mysql_query("SELECT * FROM category WHERE active = '1' ORDER BY ordering ASC"); and then while($allmodules = mysql_fetch_array($modules)) {
This then returns the relevant data that I'm looking for, all that works fine.
I am able to display these 'modules' on the webpage easily, but I'm trying to store them in other DIVs which will then create rows. So I can have 3 rows of modules on the webpage to help positioning and so on.
I'm using <div id="module-row"> 3 times over. When I'm not using PHP I can get it to work. I want to insert the first module I fetch from the while statement in to the first 'module-row' DIV and the second one in the second 'module-row' DIV and the third module, in the third DIV.
That way I'll have one module in each row. I then want to continue it, so the fourth module will then be placed in the first 'module-row' DIV and so on.
id's