title: Can I read and write to a csv file simultaneously?
body: <p>I want to read a <strong>csv</strong> file from top to bottom every time in a for each loop and check if the same content already exists, overwrites it with new content. For example, if the product id is the same, overwrites old data with new data in the same row. </p>
  
  <p>Right now, I'm using <strong>fgetcsv</strong> to read the <strong>csv</strong> file line by line. Is there a method to write to the same line as I read the <strong>csv</strong>?</p>