howto change a single line in txt file?

General discussions related to php

Moderators: macek, egami, gesf

Jay

Postby 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!

Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron