Welcome Guest, Not a member yet? Register   Sign In
Help: How i show variables from different functions on the same view?
#3

[eluser]Unknown[/eluser]
Code:
class site extends Controller {

   function index()
   {
        $data = array(
               'main_content' => 'mypage',
           'menu_name' => 'home',
               'title' => 'titolo di mypage',
               'description' => 'descrizione di mypage',
               'keywords' => 'keywords di mypage'
          );
        $this->load->view('includes/template', $data);
   }
  
   function about()
   {
        $data = array(
               'main_content' => 'about',
           'menu_name' => 'about',
               'title' => 'titolo di about',
               'description' => 'descrizione di about',
               'keywords' => 'keywords di about'
          );
        $this->load->view('includes/template', $data);
   }
this is my controller, as you can see there is menu_name in both function ... i'd like to show them (both) in one view. Or have a function that select them in another variable, and then pass it to the view.


Messages In This Thread
Help: How i show variables from different functions on the same view? - by El Forum - 11-27-2009, 03:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB