Welcome Guest, Not a member yet? Register   Sign In
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;




Theme © iAndrew 2016 - Forum software by © MyBB