I have my language files all set up, and everything is great when it comes to plain text. But in that plain text, I would like a link.
Here is my controller
function home()
{
$data['masthead'] = '/includes/masthead';
$data['content'] = '/includes/content_3_col_box';
$this->lang->load('en', 'english');
$data['text1'] = $this->lang->line('home1');
$data['text2'] = $this->lang->line('home2');
$data['text3'] = $this->lang->line('home3');
$this->load->view('includes/template', $data);
}
This is my view which serves the dynamic language
<div class="content grid_24">
<div class="grid_7 firstboxthree alpha column">
<?php
echo $text1;
?>
</div>
<div class="grid_7 midboxthree column">
<?php
echo $text2;
?>
</div>
<div class="grid_7 lastboxthree omega column">
<?php
echo $text3;
?>
</div>
This is my language file line in question
$lang['home1'] = "Introducing the most comprehensive protection plan in the industry <br /><br /> . echo anchor('controller/function', 'Text')";
Html markup seems to work great, but how can I pass off a codeigniter link in the form of echo anchor(‘controller/function’, ‘Text’)? Right now, it’s just passed off as plaintext instead of php/html codeigniter generated link
Try