[eluser]Chris Williams[/eluser]
Right. I wasn't sure if there was a helper built in for this or not. Basically, my database populates the form which changes week to week. So I can't hard code any of it.
I am using this for dynamically made forms. It works, I didn't know if there was a smarter way around this.
Code:
foreach ($_POST as $i => $someVar)
{
if ($someVar != 0){
$query = $this->db->query("SELECT name, id FROM mytable WHERE id = $i");
foreach ($query->result() as $row)
{
$body .= $row->name . " x " . $someVar . "<br />";
}
}
}
$data['body'] = $body;