serial number for faq displayed from admin
<p>I am using the following code for display questions and answers from admin.</p>

<pre><code>&lt;?php
    $select_faq = "Select `intFaqid`, `varQuestion`,`varAnswer` FROM `tbl_faq`";
    $selectfaq_result = mysql_query($select_faq);
    $select_faqnum = mysql_num_rows($selectfaq_result);

    if($selectfaq_result &gt; 0)
    {
        while($fetch_faq = mysql_fetch_array($selectfaq_result))
        {

        $faqid = $fetch_faq['intFaqid'];
        $fquestion = strip_tags(ucfirst(stripslashes(nl2br($fetch_faq['varQuestion']))));
        $fanswer = strip_tags(ucfirst(stripslashes(nl2br($fetch_faq['varAnswer']))));
        ?&gt;

        &lt;h3&gt;&lt;?php echo $fquestion; ?&gt;&lt;/h3&gt;
        &lt;p&gt;&lt;?php echo $fanswer; ?&gt;&lt;/p&gt;




    &lt;?php   
        }
    }
  ?&gt;
</code></pre>

<p>I need to display the question number before the question. I used the following code for display the question number.</p>

<pre><code>&lt;?php
  $questionno = 1;
    $numberlimit = $select_faqnum;
    while($questionno&lt;=$numberlimit)
    {
        echo $questionno;
        $questionno++;

    }
  ?&gt;
</code></pre>

<p>But i doesn't know how to display the question number before the question by combining both the codes. I need the output should display the question with question number. How can i do that?</p>
