Please give me example of returning views as data |
[eluser]Mario "St.Peter" Valentino[/eluser]
dear, can anybody here give example about returning views as data. i hope the full code( from controllers and view). i'm newbie to codeigniter. Please do me a favor Thanks
[eluser]Glazz[/eluser]
http://ellislab.com/codeigniter/user-gui...views.html To return a view to a string you can use: Code: class Welcome extends CI_Controller Is this what you need ?
[eluser]Mario "St.Peter" Valentino[/eluser]
i still confuse. here you save views to variable $string. how i display the result ?
[eluser]Glazz[/eluser]
with: Code: echo $string; but if you don't want to save the result to a string just use Code: $this->load->view('your_file.php', $data_to_send); and it will show you the view automatically
[eluser]Mario "St.Peter" Valentino[/eluser]
ok now i understand. Thanks my friend for your explanation |
Welcome Guest, Not a member yet? Register Sign In |