title: how to use mysql_fetch_array without while loop
body: <p>hey i want to use php mysql_fetch_array to fetch full table data at a time for that i use </p>
  
  <pre><code>while($user_details_result[]=mysql_fetch_assoc($user_details_qr));
  </code></pre>
  
  <p>but it returns a blank array at last like below</p>
  
  <p>output:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [user_id] =&gt; 2
              [user_name] =&gt; w
              [user_login_id] =&gt; w
              [user_login_password] =&gt; w
              [user_contacts] =&gt; w
              [user_status] =&gt; 0
              [user_post_date] =&gt; ::1
              [user_post_ip] =&gt; 2014-03-07 16:17:59
          )
  
      [1] =&gt; Array
          (
              [user_id] =&gt; 1
              [user_name] =&gt; q
              [user_login_id] =&gt; q
              [user_login_password] =&gt; q
              [user_contacts] =&gt; q
              [user_status] =&gt; 1
              [user_post_date] =&gt; ::1
              [user_post_ip] =&gt; 2014-03-07 16:14:23
          )
  
      [2] =&gt; 
  )
  </code></pre>
  
  <p>i dont understand why 3 rd row appears..please help</p>