title: PHP exec in while loop
body: <p>I have problem when excecute the exec function in while loop<br/>
  I want to transfer xml file to server the problem is the transfer to server is success 
  but the data xml is same at all, the data is still the first xml data<br/>
  are the exec action is cannot be run in while condition ? or i must clear something before run the next while ?</p>
  
  <pre><code>mysql_connect("someaddress","root","somepass");
  mysql_select_db("somedatabase");
  
      $t_data = mysql_query("SELECT * FROM inbox_hmis WHERE ordernumber = '01' AND status = 'false'");
      while($data = mysql_fetch_array($t_data)){
  
      $un_id_sms = $data['id_sms'];
      echo "$un_id_sms";
          $xmlget = "/var/www/sms/basedata/$un_id_sms.xml";
                          exec("curl -d @$xmlget http://apps.dhis2.org/demo/api/dataValueSets -H Content-Type:application/xml -u admin:password", $output);
                          $outx = $output[0];
  
          $outx_r = str_replace("'", '"', $outx);
  
          echo "$outx_r | ";
      }
  </code></pre>
  
  <p><code>$un_ind_sms</code> is unique id and the name of xml file <br/>
  <code>$outx_r</code> is the xml data </p>