howto change a single line in txt file?

General discussions related to php

Moderators: macek, egami, gesf

Post Reply

Post by Jay » Mon Sep 30, 2002 5:45 am

Learn how to use the filesystem commands. I think (off the top of my head) that file("yourfile") will return the contents in an array (one line per key value). What you want to do is cycle through all the values, change whatever you want, implode the array (using \n so it breaks it up into new lines) and then re-write it!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests