mirror of
https://github.com/retailcrm/NameCaseLib.git
synced 2025-02-06 09:09:23 +03:00
20 lines
431 B
PHP
20 lines
431 B
PHP
<?php
|
|
$firstname = "boysname.txt";
|
|
$secondname = "boyssirname.txt";
|
|
$dest = "boys.txt";
|
|
$third = "Иванович";
|
|
$f = file($firstname);
|
|
$s = file($secondname);
|
|
if(count($f)>count($s))
|
|
{
|
|
$to = count($f);
|
|
}
|
|
else
|
|
{
|
|
$to = count($s);
|
|
}
|
|
$r=fopen($dest,"w");
|
|
for($i==0;$i<=$to;$i++)
|
|
{
|
|
if($s[$i])
|
|
$sec = trim($s[$i]);
|
|
if($f[$i])
|
|
$fir = trim($f[$i]);
|
|
fwrite($r,"{$sec} {$fir} {$third}\r\n");
|
|
}
|
|
fclose($r);
|
|
?>
|