In the controller I define the following:
$codes = $this->objUser->GetGroupCodeArray();
In the corresponding template (btw, I may want to move this functionality on the header which is included in every page, how do I get it to do that?), I have the following:
foreach($codes as $code)
echo '<a href="whatever.php">'.$code.'</a>';
My desired result is that this array which has a bunch of code with a many-to-many association to the user (a user can have many codes, and each code can have many users), is output with the a-tag wrapped around each one individually with a dynamic href.
But I get an error:
Fatal error: Method GroupCode::__toString() must not throw an exception
Help?