How to add an 'if' statement for a content type in a custom views-view.tpl.php? Is it possible to add an 'if' statement for a content type in a custom views-view.tpl.php?

This is just so I can add text to show if the post in the view is either an 'episode' or an 'announcement'. The content type is called announcement.

I want to do this because I need to identify and style differently based on the post type:


If it's from an episode, it displays the episode number.
If it's an announcement, it says announcement.


So basically something like so:

&lt;?php if (content_type='whatever') {... code goes here ...} ?&gt;


If this is possible, can you provide an example?

Note: I have a custom theme called views-view-field--first-post--block--created.tpl.php and all it has is &lt;?php print $output; ?&gt;. It's called a field content date.

Also, this is what the output of the entire view looks like: stdClass Object ( [node_created] =&gt; 1434783086 [node_title] =&gt; CTRL Daily Episode 11 [nid] =&gt; 11 [node_type] =&gt; ctrl_daily ). [node_type] is what I want.
You can access it by adding Node Type field to views and access it using $row variable in views-view.tpl.php.

$rows: The results of the view query, if any


Or $views is also accessible in each and every views template file.