Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

howto change a single line in txt file?

General discussions related to php

Moderators: macek, egami, gesf

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

Return to PHP General

Who is online

Users browsing this forum: shmideos and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron