I have this template file:
<article class="box vest p10">
<h2 class="box_naslov"><?php echo $vst['naslov'] ?></h2>
<p><?php echo word_limiter($vst['opis'], 25) ?></p>
<a href="<?php echo base_url('admin/vesti/update/' . $vst['id_clanak']) ?>">Izmeni Vest</a>
<a role=obrisi href="<?php echo base_url('admin/vesti_delete/' . $vst['id_clanak']) ?>">Obriši Vest</a>
<?php
$slider = $vst['slider'] == 0 ? 'Ubaci u slider' : 'Izbaci iz slider-a';
$q = $vst['slider'] == 0 ? 'ubaci' : 'izbaci';
?>
<a role=slider href="<?php echo base_url('admin/vesti_slider/' . $vst['id_clanak'] . '?q=' . $q )?>"><?php echo $slider ?></a>
</article>
In my view file I have tried this:
<?php foreach ($vesti_slider as $vst): ?>
<?php $this->load->view('templates/admin/vesti', $vst) ?>
<?php endforeach ?>
I got error - ** Undefined variable: vst**. Is there some way to do this?