title: How to hide a div tag using php
body: <p>In the below code, I'm trying to hide the div if <code>($settings['type'] != 11)</code>. The internal if statements work well, but if <code>($settings['type'] = 11)</code> div is visible and it works well. But, incase if <code>($settings['type'] != 11)</code> then div should be hidden. But it is displayed.     </p>
  
  <pre><code>  &lt;?php
      if ($settings['type'] = 11) {
      ?&gt;
             &lt;div id="hr" &gt;
            &lt;br&gt;
                &lt;?php $str1="abc";
                 if (strcmp ( $str1 ,  "abc" )==0):?&gt; 
                 Test
                 &lt;center&gt;
                 Contact
                 &lt;/center&gt;
                &lt;?php elseif (strcmp ( $str1 ,  "bca" )==0):?&gt; 
                Test else&lt;center&gt;
                Contact&lt;/center&gt;
          &lt;/div&gt;
         &lt;?php endif; ?&gt;
      &lt;?php }?&gt;
  </code></pre>
  
  <p>How can I debug this? What can be causing this problem.</p>