I've got a text file which contains about 60 lines. Within in that are 2 lines:
DeviceIP 10.0.0.1
DeviceIP 10.2.36.4
I have a PHP form which has $device1
& $device2
How do I find and replace in the file, replacing the first DeviceIP with $device1 and the second with $device2 ?
Obviously the IP Addresses will change so I can't search on those. I know how to do it for one match, but not multiple.
Thanks