title: smarty php in_array not working
body: <p>Smarty-3.1.20</p>
  
  <p>Rewriting php webapp backend. Using Smarty because it was required a few years back, worked and why not but now it's wrecking my head. Nested template outputting checkboxes. </p>
  
  <p>Why does the in_array return true if I paste one of the values as a string but not if I reference as a variable? Arrays are var_dump-ed and are arrays and {$otherArray[0]} returns correct variable. $anArray[loop] is printing the correct variable. No extra blanks in array strings. Stop me before I throw it all out, paste json into the bottom of the html and do it all with javascript (next time definitely)</p>
  
  <p>tl;dr:</p>
  
  <p>in_array is not returning true from a variable but is from a string?</p>
  
  <pre><code>&lt;input type='checkbox' name='{$anArray[loop]}' value='{$anArray[loop]}' 
  {if in_array($anArray[loop]}, $otherArray)} checked{/if}&gt;
  &lt;br /&gt;
  {$anArray[loop]}}
  </code></pre>