On Wed, 17 Jan 2001, Wade Halsey wrote:

> Hi
>
> I have the following code in Delphi:
> procedure TFormConfirmAllocation.CreateTxt;
> var TxFile : TextFile;
>      Buffer : string;
>      x : integer;
> begin
>
>     AssignFile(TxFile,'\SkyTrac.sky');
>
>
>     Rewrite(TxFile);
>
>     with FormConfirmAllocation.Query1  do begin
>     open;
>     while not Eof do begin
>         for x :=  0 to fields.Count - 1 do begin
>         Buffer := Fields[x].AsString;
>         Writeln(TxFile, Buffer);
>         end;
>     next;
>     end;
>     end;//with
> CloseFile(TxFile);
>     end;
>
> Now I want to create the same sort of thing in Php, could someone please help!
> Thanks
> Wade
> [EMAIL PROTECTED]
>

<?php
 ...
$fp=fopen("/tmp/SkyTrac.sky", "w");
$result=xxx_query(...);
while ($row=xxx_fetch_array($result))
{
  while (list($key, $val)=each($row))
  {
    fputs($fp, $val);
  };
};
fclose($fp);
?>

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to