Writing data from odbc_fetch_array to a file

I need some help writing data I get from odbc_fetch_array() to a text file. The script I have written right now prints the data to the screen.
[php]
$conn = odbc_connect($connectionString, $user, $password);
$sql_String = file_get_content($argv[2]);
$query = odbc_exec($conn, $sql_String);

while($row = odbc_fetch_array($query)){
print_r($row);
}
[/php]

I’ve looked through several sites, and I just haven’t found any good examples.
Any help would be great.

Sponsor our Newsletter | Privacy Policy | Terms of Service