Caffeine is an important tool !
Your last posted fixed my last problem, so I decided to put everything together and test
<?
require('connect.php');
$mysql_result = mysql_query("SELECT * FROM listings");
while($data = mysql_fetch_array($mysql_result, MYSQL_NUM)){
$rows = array();
foreach($data as $row){
$rows[] = $row;
}
$tabbed_rows[] = implode("\t", $rows)."\n";
}
mysql_close();
$fp = fopen("file.txt", "w+");
$str = implode($tabbed_rows);
fputs($fp, $str, strlen($str));
@fclose($fp);
$ftp = ftp_connect('SERVER_IP_NUMBER_HERE');
ftp_login($ftp, USERNAME, PASSWORD);
$put = ftp_put($ftp, "file.txt", "file.txt", FTP_ASCII);
if(!$put){
echo "FTP failed";
}else{
echo "FTP success";
}
ftp_close($ftp);
?>
I created a file called file.txt and chmod 777. The error message I get is : Warning: Wrong parameter count for implode()
Its unhappy with this line:
$str = implode($tabbed_rows);
Thanks for all your help!