Welcome Guest, Not a member yet? Register   Sign In
php mod % 3
#12

[eluser]mdriscol[/eluser]
Hey, Thanks for the quick reply

What I'm trying to do is very similar to what you are doing. It's for an online newsletter type of layout. I have three columns set up like this:
Code:
<div id='column1'>
Content 1
</div>

<div id='column2'>
Content 2
</div>

<div id='column3'>
Content 3
</div>

In my query, I have a title, author, date, and photos returned from a model.

From what I understand, the way you did it was to use a foreach and then take the mod of each id from the query to separate the queries into 5 columns. But my data is more than yours so I don't know how to go about it.

Is there another way to go about it? I don't think its the best idea to put my view code into the controller in order to separate my query into 3 groups. I have more in my view than just a sentence with a link like you do.

Maybe you can point me somewhere. Thanks!


Messages In This Thread
php mod % 3 - by El Forum - 10-18-2007, 06:07 PM
php mod % 3 - by El Forum - 10-18-2007, 08:01 PM
php mod % 3 - by El Forum - 10-18-2007, 10:00 PM
php mod % 3 - by El Forum - 10-18-2007, 10:07 PM
php mod % 3 - by El Forum - 10-19-2007, 03:31 AM
php mod % 3 - by El Forum - 10-29-2007, 04:04 PM
php mod % 3 - by El Forum - 10-31-2007, 05:24 AM
php mod % 3 - by El Forum - 10-31-2007, 08:23 AM
php mod % 3 - by El Forum - 10-31-2007, 09:03 AM
php mod % 3 - by El Forum - 10-09-2008, 04:07 PM
php mod % 3 - by El Forum - 10-09-2008, 09:06 PM
php mod % 3 - by El Forum - 10-09-2008, 11:17 PM
php mod % 3 - by El Forum - 10-10-2008, 12:34 AM
php mod % 3 - by El Forum - 10-10-2008, 03:38 AM
php mod % 3 - by El Forum - 10-10-2008, 12:23 PM
php mod % 3 - by El Forum - 10-11-2008, 09:36 AM
php mod % 3 - by El Forum - 10-11-2008, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB