Jump to content

writing array to file


BRADERY

Recommended Posts

Ok I need to write an array to a file here is the code

if($place[2] < 10){
echo "Account Invalid";
$account = var_dump($account_data[$i][0]);
echo $account;
$fp3=fopen('invalid.txt', 'a+');
fwrite($fp3, $account);
fclose($fp3);}

 

when I try

 

	if($place[2] < 10){
echo "Account Invalid";
$account = var_dump($account_data[$i][0]);
echo $account;
$fp3=fopen('invalid.txt', 'a+');
fwrite($fp3, $account_data[$i][0]);
fclose($fp3);}

 

I just get "Array[1]" written to the file..

 

What can I do to write the array to the file?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/222669-writing-array-to-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.