Add a comment. Active Oldest Votes. Gordon Gordon k 69 69 gold badges silver badges bronze badges. Show 3 more comments. Felix Kling Felix Kling k gold badges silver badges bronze badges. Sarfraz Sarfraz k 70 70 gold badges silver badges bronze badges. Ahmad Ahmad 4, 8 8 gold badges 26 26 silver badges 39 39 bronze badges.
I just wrote this function to output an array as text: Should output nicely formatted array. This script was created for internal use. This is not fool proof and should be used with trusted data only. Would be near impossible to do that with serialized output Not the cleanest function but it gets the job done. Here is the code. Dieter Gribnitz Dieter Gribnitz 4, 2 2 gold badges 38 38 silver badges 36 36 bronze badges. This will format output in a way that can be copied and pasted as a working array.
Vivek Tailor Vivek Tailor 2 2 silver badges 5 5 bronze badges. Now I only need to know how to delete data from file before adding updated data. Sumit Sumit 31 2 2 bronze badges.
Patrick Mutwiri Patrick Mutwiri 1, 1 1 gold badge 10 10 silver badges 23 23 bronze badges. Prints "Array" as text for associative arrays. Abhisheka Kumar Abhisheka Kumar 1. I've already tested everything else and it all works except the last function. By the way, ignore most of the comments; they were part of the code to start with. Motoma 3, Expert 2GB. I checked that one How would I go about doing that using this method? AdrianoMT 5.
Expand Select Wrap Line Numbers. Motoma Kudos buddy. Worked well. Post Reply. Similar topics. NET Framework. Data from xml file gets truncated when writing to text file. Writing a text file to the file system. Visual Basic. Problems with writing a text file again. Writing to text file. Writing a text file to an mdb. Beginners needs some help in Writing to text file. A file filename. We can use the fwrite method to write the array to the file.
This method creates a writable file in the directory with the fopen function. Use the fopen function to create a file file. In the example below, the fopen function creates a file file. The array is written to the file using the fwrite function. Check the PHP manual to learn more about the fwrite function.
0コメント