Welcome Guest, Not a member yet? Register   Sign In
MySQL Loop
#1

[eluser]georgerobbo[/eluser]
Okayy, I am probably trying to accomplish too much for a beginner. I have a sidebar where I have a multiple sub divs.

Code:
div id="sidebar">
            
        <div class="sideitem">
            <div class="sidetitle">
                <h3>&lt;?php echo $sidetitle['1']; ?&gt;</h3>
            </div>
                <p>&lt;?php echo $sidecont['1']; ?&gt;</p>
        </div>
        
        <div class="sideitem">
            <div class="sidetitle">
                <h3>&lt;?php echo $sidetitle['2']; ?&gt;</h3>
            </div>
                <p>&lt;?php echo $sidecont['2']; ?&gt;</p>
        </div>

What I want to accomplish is for code-igniter to pull the information from an MySQL database, insert the values into an associative array like above and then for the <div class="sideitem"> to work on a loop. I'm struggling getting the database results into an associative array and then into the tags.


Messages In This Thread
MySQL Loop - by El Forum - 08-10-2009, 05:12 AM
MySQL Loop - by El Forum - 08-10-2009, 06:39 AM
MySQL Loop - by El Forum - 08-10-2009, 06:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB