I have a text file with the following contents:
Code: Select all
$color1 = red
$color2 = blue
$color3 = green
$color4 = orangeThanks!
Moderator: General Moderators
Code: Select all
$color1 = red
$color2 = blue
$color3 = green
$color4 = orangeCheck out http://w3schools.com/php/php_ref_filesystem.aspfrankm wrote:Hello. I need PHP to edit a text file. For example.
I have a text file with the following contents:
How would I have a PHP script go and edit color3 to yellow?Code: Select all
$color1 = red $color2 = blue $color3 = green $color4 = orange
Thanks!