Q:

dynamically loading content codeigniter

I have this html code 
<body>

<div class="wrapper">
<div class="banner">

</div>
<div class="nav_bar">
    <ul>
        <li><a href="">Home</a></li>
        <li><a  href="">News</a></li>
        <li><a  href="">Registration FAQs</a></li>
        <li><a  href="">How to Register and Rules</a></li>
        <li><a  href="">Register school</a></li>
        <li><a  href="">Register pupil</a></li>
        <li><a   href="">About Us</a></li>
        <li><a   href="">Contact Us</a></li>
    </ul>

</div>

<div class="content_area">
    **<?php echo $content; ?>**
</div>
<div class="clear"></div>

 </div>
<div class="footer">
<div>

</div>
</div>

 </body>

now once the user clicks the links i want to load the content depending on which link he has clicked as you can see inn the code above. I can load the content as long as its all html but now that php tags are included i find it hard. how do i load the content with the following data? 
   <div id="form_input">
   <?php    
    echo form_open('form/data_submitted');

    // Show Name Field in View Page
   echo form_label('User Name :', 'u_name');
   $data= array(
   'name' => 'u_name',
    'placeholder' => 'Please Enter User Name',
   'class' => 'input_box'
    );
   echo form_input($data);

    // Show Email Field in View Page
   echo form_label('User email:', 'u_email');
   $data= array(
   'type' => 'email',
   'name' => 'u_email',
   'placeholder' => 'Please Enter Email Address',
   'class' => 'input_box'
    );
   echo form_input($data);
   ?>
  </div>
   // Close Form
   <?php echo form_close();?>

is it possible?

A:

I solved it by nesting views that is calling $this->load->view($content); within my template view instead of <?php echo $content;?> then on the controller function i loaded the content like this 
 $data['content']='view_name_here'; // this loads content with a view

 $this->load->view('my_template',$data); //loaded my template with $content

