title: While loop iterating only once while using api to post on users wall?
body: <p>I am using while loop to post on users wall through application. While loop executes only once and post on users wall once at a time. I wonder why this is happening.</p>
  
  <pre><code>    while($data = mysql_fetch_array($result)){  
          echo "posting in userwall";
          $facebook-&gt;api('/'.$data['postid'].'/feed?access_token='.$data['token_key'], 'post', $attachment);
      }
  </code></pre>
  
  <p>The above code executes only one time even if there are many rows. However when i comment second line "$facebook->api('/'.$data['postid'].'/feed?access_token='.$data['token_key'], 'post', $attachment);" it runs as many times it has rows. for eg</p>
  
  <pre><code>    while($data = mysql_fetch_array($result)){  
         echo "posting in userwall";
         //$facebook-&gt;api('/'.$data['postid'].'/feed?access_token='.$data['token_key'], 'post', $attachment);
      }
  </code></pre>
  
  <p>I have two rows data and it shows o/p two times. However while i use "$facebook->api('/'.$data['postid'].'/feed?access_token='.$data['token_key'], 'post', $attachment);" it runs only once why?</p>