• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding a view page in main view page

#1
[eluser]Unknown[/eluser]
Hi i'm fairly new to CI, currently working on making a menu where i am using ajax to change the body of the div (keeping menu the same). I am stuck on how to take another php file into my main php file (which contains my tabs). Below i have a simple sample of how i would process this....would this work? is it correct? If not how should i approach this?

Controller
Code:
<?php
class Blog extends CI_Controller {

function index()
{
  $data['title'] = <?php echo base_url();?>/method/function;
  

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

Code:
<html>
<head>

</head>
<body>
<div id ="this"> &lt;title&gt;&lt;?php echo $title;?&gt;&lt;/title&gt;&lt;/div>
&lt;/body&gt;
&lt;/html&gt;


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.