how to print particular div content using php?
<p>I've written a sample code.</p>

<p>My query is that, how to print particular element's content as reply to user.</p>

<pre><code>&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;sample&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;?php 
         Hi User, welcome to txtweb.&lt;br/&gt;
         &lt;form action=" " method="post"&gt;
         Enter a value b/w (1 to 3):&lt;input type="text" name="UsrInput"&gt;&lt;br/&gt;
         &lt;input type="button" value="Get Content"&gt;&lt;br/&gt;
         &lt;div id="res1"&gt;
         this is 1st result...
         &lt;/div&gt;
         &lt;div id="res2"&gt;
         this is 2nd result...
         &lt;/div&gt;
         &lt;div id="res3"&gt;`
         this is 3rd result...
         &lt;/div&gt;
         ?&gt;
   &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Now, assume that when a user enters '2' on text box as input then i have to reply him with the div content which has id="res2".
how to do this?</p>
