[eluser]Colin Williams[/eluser]
In your loop, just check if you're on the first or last of your result set.
Code:
// $result is your array
for ($i = 0; $i < count($result); $i++)
{
print '<div class="grid_2'
. (($i == 0) ? ' alpha' : (($i + 1 == count($result)) ? ' omega' : NULL)
. '">Other stuff</div>"; // Use $result[$i] to retrieve current item in loop
}
Double-check that though.. might be a bit buggy
You could do this in a foreach loop too if you preferred.
Also, I hate CSS "grid frameworks". They operate under a false assumption of what a gridded layout is. And, I think the HTML should be made to best describe the content it marks up, not formed to play well with CSS rules in place.