BRADERY Posted December 26, 2010 Share Posted December 26, 2010 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 More sharing options...
BRADERY Posted December 26, 2010 Author Share Posted December 26, 2010 I've tried $account = print_r($account_data[$i][0]); also.. didnt work lol Link to comment https://forums.phpfreaks.com/topic/222669-writing-array-to-file/#findComment-1151537 Share on other sites More sharing options...
the182guy Posted December 26, 2010 Share Posted December 26, 2010 What is in $account_data and exactly which part of it are you trying to write out? Link to comment https://forums.phpfreaks.com/topic/222669-writing-array-to-file/#findComment-1151541 Share on other sites More sharing options...
BRADERY Posted December 26, 2010 Author Share Posted December 26, 2010 pmed you Link to comment https://forums.phpfreaks.com/topic/222669-writing-array-to-file/#findComment-1151543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.