CodeIgniter Forums
using helpers and plug-ins - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: using helpers and plug-ins (/showthread.php?tid=24416)



using helpers and plug-ins - El Forum - 11-09-2009

[eluser]wilfred[/eluser]
Hi'
I have been trying to load inbuilt helpers and plugins using the following code without succeding. Do i have to build my own helpers?


<?php
class Blog extends Controller{

function Index()
{
$data['drinks'] = array('mountain bull','tusker','Keg','Miti ni dawa');
$data['title'] = "party zone";
$data['heading'] = "lets rock and keep it skanking";

$this->load->view('blogview',$data);

$this->load->library('validation');

$this->load->helper('form_helper');

$this->load->database();

$query = $this->db->query('SELECT drinks, price, manufacturer FROM hippo');

foreach ($query->result() as $row)
{
echo $row->drinks;
echo $row->price;
echo $row->manufacturer;
}

echo 'Total Results: ' . $query->num_rows();
}
}


using helpers and plug-ins - El Forum - 11-09-2009

[eluser]garymardell[/eluser]
you dont need the _helper part on form_helper when loading them.