Thank you for your kind reply.
- Files can be written like this?
<?php
$data = "File-1.txt, File-2.txt, File-3.txt, File-4.txt, File-5.txt, File-6.txt, File-7.txt";
$file = file($data);
$i = 1; // the [x]th row you'd like to change (1 means the second row)
$yourArray = array("purple","grey","pink","cyan");
$row = explode(",",$file[$i]);
for ($j=0;$j<count($row);$j++) {
$row[$j] = $yourArray[$j];
}
$file[$i] =implode(",",$row)."\n";
$content = implode("",$file);
$open = fopen($data,"w");
fwrite($open,$content);
?>
For example, this is File-1.txt for sample.
I can be surrounded by a sea of people and still feel lonely,
but when I stand next to you I feel like someone new.
When you look in my eyes I feel a shiver down my spine.
When you walk away I feel my heart break in two,
and I wonder,
what do you think of me?
A million possible answers float around in my head,
but which is the truth?
Will a day come when you say what you think,
or will you leave me here,
lost in thought,
wanting more and more for an answer.
Give me a signal.
Give me a sign.
Anything to get the thought out of mind,
as long as it's the truth.
I want to change these text lines,
A million possible answers float around in my head,
but which is the truth?
Will a day come when you say what you think,
or will you leave me here,
with these.
Continuous as the stars that shine
And twinkle on the milky way,
They stretched in never-ending line
Along the margin of a bay:
Ten thousand saw I at a glance,
Tossing their heads in sprightly dance.
So, File-1.txt will be this.
I can be surrounded by a sea of people and still feel lonely,
but when I stand next to you I feel like someone new.
When you look in my eyes I feel a shiver down my spine.
When you walk away I feel my heart break in two,
and I wonder,
what do you think of me?
Continuous as the stars that shine
And twinkle on the milky way,
They stretched in never-ending line
Along the margin of a bay:
Ten thousand saw I at a glance,
Tossing their heads in sprightly dance.
lost in thought,
wanting more and more for an answer.
Give me a signal.
Give me a sign.
Anything to get the thought out of mind,
as long as it's the truth.