我有两个以这种方式创建的文本文件:
<?php
$lines = file('Country.txt');
$newf = array();
foreach ($lines as $line)
$newf[] = substr($line, 2);
file_put_contents('country2.txt', implode("\n", $newf));
$lines2 = file('countryenglish.txt');
$newf2 = array();
foreach ($lines2 as $line)
$newf2[] = substr($line, 3);
file_put_contents('countryenglish2.txt', implode("\n", $newf2));
?>
两者都显示如下数据:
Country2.txt:
Text1Data1
text1Data2
text1Data3
>
countryenglish2.txt
Text2Data1
text2Data2
text2Data3
我想显示:
Text2Data1Text1Data1
text2Data2text1Data2
text2Data3text1Data3
在此先感谢您的帮助!