title: Codeigniter: Head & Title Tags with if/else
body: <p>I am newbie in CodeIgniter and in PHP as well. I am looking for an example to find out how it is worked before recode it to my project. And also you can explain basically if you want without any example. I have been looking for it on the internet but I couldnt find yet. I don't know how to search about this topic on Google I guess.</p>
  
  <p>I have two <em>header.php</em> files that are renamed as <em>header_post.php</em> and <em>header_main.php</em> in "views" folder. </p>
  
  <p>For <em>header_post.php</em>, the meta tags such as description, title and so on are changed based on the the title and the content of the post I published. </p>
  
  <p>For <em>header_main.php</em>, the meta tags such as description, title and so on are stable based on the the title and the description of my blog. </p>
  
  <p>But I want to create a header.php instead of header_post.php and header_main.php. When it is in homepage of the blog the codes I wrote for header_main.php should work and on the other hand when it is in a post's page the codes I wrote for header_post.php should work.</p>
  
  <p>As an example, </p>
  
  <pre><code>Homepage:  &lt;title&gt;Bari's Blog&lt;/title&gt;
  In a Post: &lt;title&gt;Post's Title&lt;/title&gt;
  </code></pre>
  
  <p>I need your help about how to write if/else statement?</p>