Replace a string in array then re-write line.
| From: | enthalpy | Date: | Fri, 09 Mar 2001 03:53:23 +0000 |
| Subject: | Replace a string in array then re-write line. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43109@lists.php.net to get a copy of this message | ||
ok so im using fopen to read a file split each line in to an array. Check
those variables against the same situation with a different file. Replace
a string in the second file with a string in the first file. Then rewrite
the line with the new variable.
here is a small example of how im opening and exploding the lines
$fpoint1 = fopen ($newfile,"r") or die("couldnt open working file");
while ($data = fgetcsv ($fpoint1, $newfilesize, " ")) {
$num = count ($data);
echo "$num fields in line $row: \n";
for ($c=0; $c<$num; $c++) {
}
im opening the second file the same way and if data[0] and data2[0] are =
then it will replace the strings.
anyway if i made any sense at all i think you will know what im talking
about.
<-----CoreComm-Internet-Services---http://core.com----->
(Jon Marshall CoreComm Services Chicago)
(jonathon.marshall@core.com Systems Engineer II)
(enthalpy@core.com Network Operations)
<-----Enthalpy.org-------------http://enthalpy.org----->
(enthalpy@enthalpy.org The World of Nothing)
<------------------------------------------------------>