[eluser]ironlung[/eluser]
Hi I'm obviously missing something painfully obvious but why isn't my $langs variable appearing in my view?
The controller
Code:
$fred['langs'] = $languages;
echo print_r($fred);
$this->template->write_view('toolbar', 'language_bar_view', $fred, FALSE);
The View
Code:
<ul>
<? echo print_r($langs); ?>
<?= "hello";?>
<? foreach $langs as $lang : ?>
<li><?//=anchor($lang['uri'], $lang['language_code']) ?></li>
<? endforeach ?>
</ul>
The output
Code:
Array ( [langs] => Array ( [0] => Array ( [language_code] => en [uri] => en/home ) [1] => Array ( [language_code] => es [uri] => es/home ) ) ) 1
Email/Username:
Password:
Remember Me:
hello
The print_r($fred) looks good to me. Am I going crazy? Where is my $langs?