PHP - IF div clicked/has class or id return code
<p>Some HTML</p>

<pre><code>&lt;div class='menu_mcwiki'&gt;
     &lt;ul&gt;
          &lt;li&gt; &lt;p&gt; Blocks List &lt;/p&gt;&lt;/li&gt;
          &lt;li&gt; &lt;p&gt; Item List &lt;/p&gt;&lt;/li&gt;
          &lt;li&gt; &lt;p&gt; Potions &amp; Food &lt;/p&gt;&lt;/li&gt;
          &lt;li&gt; &lt;p&gt; NPC Trading &lt;/p&gt;&lt;/li&gt;
          &lt;li&gt; &lt;p&gt; Crafting &lt;/p&gt;&lt;/li&gt;
          &lt;li&gt; &lt;p&gt; Enchanting &lt;/p&gt;&lt;/li&gt;
          &lt;li&gt; &lt;p&gt;Legend:&lt;/p&gt;&lt;/li&gt;
     &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>I would like to get something like, if you click on <code>&lt;li&gt;</code>, the if statement in php file will show an output.</p>

<p>I thought to do it with javascript's <code>.addClass</code> <code>.removeClass</code> for add or remove class from <code>&lt;li&gt;</code>, and add to a php file if statement something like <code>{if has class1}</code> then show output, and if it doesn't exist: show anything.</p>

<p>Can someone point me in the right direction? Sorry for my English.</p>
