We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Newbie Question About the Display Class and Table Cells

Development and Programming

Zac G.'s avatar
Zac G.
268 posts
16 years ago
Zac G.'s avatar Zac G.

Hi EEmodulers,

I am working on my first module, and therefore dealing with the EE classes for the first time.

I am trying to output a table row heading that loops through a query and adds a cell to the row for each of the query results.

Here is what I have right now:

foreach($query->result as $row)
{                                
    $assignment_cells .= $row['assignment_text'];
    if ($i != $length)
    {
        $assignment_cells .= ', ';
    }
}

... skip down ...

    $DSP->tr().
    $DSP->table_qcell('tableHeadingAlt',
            array(
                $LANG->line('student'),
                $assignment_cells,
                $LANG->line('grade_total')
            )).
    $DSP->tr_c();

Obviously this is not working, it just outputs all of the assignments into one cell.

How would I do this so that each assignment gets it own assignment?

Thanks! Zac

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.