php array doesnt write to file as expected -


basically im reading file, pushing array, , rewriting file arrays no data lost

this text file after write array. pirmadienis,antradienis,etc stored on different arrays. when write "pirmadienis" array starts in second line , pushed other 1 side.

pirmadienis "array fwrite here" antradienis treciadienis ketvirtadienis penktadienis 

this php use. $pirm array "pirmadienis". use 4 more foreach loops each array writen file. ideas why creating new line?

$file = fopen($failas,"w+"); foreach($pirm $key => $value) { fwrite($file,$value);  } 


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -