title: Custom post type - displaying sets of data if selected on Worpdress back end
body: <p>I am trying to extend a custom wordpress plugin that displays sets of data stored on the Wordpress database when an option is setup on the backend via a custom metabox on a custom post type.<br>
  At the moment it is displaying two custom sets of data but I need to add a third one. I think my php skills are obviously not up to scratch for this one as I keep getting the error below:</p>
  
  <p>Parse error: syntax error, unexpected end of file  on line 103</p>
  
  <pre><code>&lt;?php if ($contestedby2013 == true || $contested2013 == true) { ?&gt;
          &lt;div class="row" id="data-row-ie"&gt;
          &lt;div class="span12"&gt;
              &lt;ul id="result-graph-tabs" class="nav nav-tabs" style="margin-top:20px;margin-bottom:0;"&gt;   
                  &lt;li&gt;&lt;a href="#olderresults" data-toggle="tab"&gt;Older election data&lt;/a&gt;&lt;/li&gt;
                  &lt;?php if($contested2005 == true) {echo '&lt;li&gt;&lt;a href="#results2005full" data-toggle="tab"&gt;2005 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2008 == true) {echo '&lt;li&gt;&lt;a href="#results2008by" data-toggle="tab"&gt;2008 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2009 == true) {echo '&lt;li&gt;&lt;a href="#results2009full" data-toggle="tab"&gt;2009 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2009 == true) {echo '&lt;li&gt;&lt;a href="#results2009by" data-toggle="tab"&gt;2009 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2010 == true) {echo '&lt;li&gt;&lt;a href="#results2010by" data-toggle="tab"&gt;2010 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2013 == true) {echo '&lt;li&gt;&lt;a href="#results2013full" data-toggle="tab"&gt;2013 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2013 == true) {echo '&lt;li&gt;&lt;a href="#results2013by" data-toggle="tab"&gt;2013 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
              &lt;/ul&gt;
              &lt;div id="result-graph-tabs-content" class="tab-content"&gt;
                  &lt;div class="tab-pane" id="olderresults"&gt;
                  &lt;div class="row"&gt;
                  &lt;div class="span12"&gt;
                  &lt;h3&gt;Older election result data for &lt;?php echo $electoral_area_title; ?&gt; area&lt;/h3&gt;&lt;p&gt;Before the 2005 election, county level electoral boundaries in Warwickshire were slightly different. Because of this difference, data isn't displayed alongside the 2005, 2009 and 2013 results - but it is still available to view and download through the &lt;a href="//opendata.warwickshire.gov.uk/tags/elections"&gt;opendata.warwickshire.gov.uk&lt;/a&gt; website.&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;?php include('tab-logic-2005-full.php');?&gt;
                  &lt;?php include('tab-logic-2008-by.php');?&gt;
                  &lt;?php include('tab-logic-2009-full.php');?&gt;
                  &lt;?php include('tab-logic-2009-by.php');?&gt;
                  &lt;?php include('tab-logic-2010-by.php');?&gt;
                  &lt;?php include('tab-logic-2013-full.php');?&gt;
                  &lt;?php include('tab-logic-2013-by.php');?&gt;
              &lt;/div&gt; 
          &lt;/div&gt;
          &lt;/div&gt;
  &lt;!-- Displays extra data set if selected --&gt;
  &lt;?php if ($contestedby2014 == true || $contested2013 == true) { ?&gt;
  
          &lt;div class="row" id="data-row-ie"&gt;
          &lt;div class="span12"&gt;
              &lt;ul id="result-graph-tabs" class="nav nav-tabs" style="margin-top:20px;margin-bottom:0;"&gt;   
                  &lt;li&gt;&lt;a href="#olderresults" data-toggle="tab"&gt;Older election data&lt;/a&gt;&lt;/li&gt;
                  &lt;?php if($contested2005 == true) {echo '&lt;li&gt;&lt;a href="#results2005full" data-toggle="tab"&gt;2005 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2008 == true) {echo '&lt;li&gt;&lt;a href="#results2008by" data-toggle="tab"&gt;2008 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2009 == true) {echo '&lt;li&gt;&lt;a href="#results2009full" data-toggle="tab"&gt;2009 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2009 == true) {echo '&lt;li&gt;&lt;a href="#results2009by" data-toggle="tab"&gt;2009 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2010 == true) {echo '&lt;li&gt;&lt;a href="#results2010by" data-toggle="tab"&gt;2010 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2013 == true) {echo '&lt;li&gt;&lt;a href="#results2013full" data-toggle="tab"&gt;2013 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2014 == true) {echo '&lt;li&gt;&lt;a href="#results2014by" data-toggle="tab"&gt;2013 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
              &lt;/ul&gt;
              &lt;div id="result-graph-tabs-content" class="tab-content"&gt;
                  &lt;div class="tab-pane" id="olderresults"&gt;
                  &lt;div class="row"&gt;
                  &lt;div class="span12"&gt;
                  &lt;h3&gt;Older election result data for &lt;?php echo $electoral_area_title; ?&gt; area&lt;/h3&gt;&lt;p&gt;Before the 2005 election, county level electoral boundaries in Warwickshire were slightly different. Because of this difference, data isn't displayed alongside the 2005, 2009 and 2013 results - but it is still available to view and download through the &lt;a href="//opendata.warwickshire.gov.uk/tags/elections"&gt;opendata.warwickshire.gov.uk&lt;/a&gt; website.&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;?php include('tab-logic-2005-full.php');?&gt;
                  &lt;?php include('tab-logic-2008-by.php');?&gt;
                  &lt;?php include('tab-logic-2009-full.php');?&gt;
                  &lt;?php include('tab-logic-2009-by.php');?&gt;
                  &lt;?php include('tab-logic-2010-by.php');?&gt;
                  &lt;?php include('tab-logic-2013-full.php');?&gt;
                  &lt;?php include('tab-logic-2014-by.php');?&gt;
              &lt;/div&gt; 
          &lt;/div&gt;
          &lt;/div&gt;
  &lt;?php } ?&gt;
  &lt;!--End of additional data set  --&gt;
  &lt;?php } else { ?&gt;
                  &lt;div class="row" id="data-row-ie"&gt;
                  &lt;div class="span12"&gt;
                  &lt;ul id="result-graph-tabs" class="nav nav-tabs" style="margin-top:20px;margin-bottom:0;"&gt;   
                  &lt;li&gt;&lt;a href="#olderresults" data-toggle="tab"&gt;Older election data&lt;/a&gt;&lt;/li&gt;
                  &lt;?php if($contested2005 == true) {echo '&lt;li&gt;&lt;a href="#results2005full" data-toggle="tab"&gt;2005 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2008 == true) {echo '&lt;li&gt;&lt;a href="#results2008by" data-toggle="tab"&gt;2008 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2009 == true) {echo '&lt;li&gt;&lt;a href="#results2009full" data-toggle="tab"&gt;2009 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contestedby2009 == true) {echo '&lt;li&gt;&lt;a href="#results2009by" data-toggle="tab"&gt;2009 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2010 == true) {echo '&lt;li&gt;&lt;a href="#results2010by" data-toggle="tab"&gt;2010 by-election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
                  &lt;?php if($contested2013 == true) {echo '&lt;li&gt;&lt;a href="#results2013full" data-toggle="tab"&gt;2013 full election results&lt;/a&gt;&lt;/li&gt;';}?&gt;
              &lt;/ul&gt;
              &lt;div id="result-graph-tabs-content" class="tab-content"&gt;
                  &lt;div class="tab-pane" id="olderresults"&gt;
                  &lt;div class="row"&gt;
                  &lt;div class="span12"&gt;
                  &lt;h3&gt;Older election result data for &lt;?php echo $electoral_area_title; ?&gt; area&lt;/h3&gt;&lt;p&gt;Before the 2005 election, county level electoral boundaries in Warwickshire were slightly different. Because of this difference, data isn't displayed alongside the 2005, 2009 and 2013 results - but it is still available to view and download through the &lt;a href="//opendata.warwickshire.gov.uk/tags/elections"&gt;opendata.warwickshire.gov.uk&lt;/a&gt; website.&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;?php include('tab-logic-2005-full.php');?&gt;
                  &lt;?php include('tab-logic-2008-by.php');?&gt;
                  &lt;?php include('tab-logic-2009-full.php');?&gt;
                  &lt;?php include('tab-logic-2009-by.php');?&gt;
                  &lt;?php include('tab-logic-2010-by.php');?&gt;
                  &lt;?php include('tab-logic-2013-full.php');?&gt; &lt;!-- added 2013 by elections result tab - NM 3.12.2013  --&gt;
              &lt;/div&gt; 
          &lt;/div&gt;
          &lt;/div&gt;
  &lt;? php } ?&gt;
  </code></pre>
  
  <p>Any thoughts?</p>