CodeIgniter Forums
HELP: Undefined Variable on my view... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: HELP: Undefined Variable on my view... (/showthread.php?tid=45535)



HELP: Undefined Variable on my view... - El Forum - 09-25-2011

[eluser]Unknown[/eluser]
Hi all... im newbie CodeIgniter's user. I need help with this:

Quote:<?php
class Services extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->helper('url');

}

public function index()
{

$this->load->view('services');
}

public function manuales()
{
$spc = "Hola mundo";
$this->load->view('manuales', $spc);
return $spc;
}

}
?>

Im trying to print $spc value on mi view Manuales and i get ERROR: Undefined variable: spc.

Here is my view part code:

Quote:<div class="entry">
<p>
&lt;?php

echo $spc;


?&gt;
</p>
</div>

i need some help...