I have an array $array_file_names that contains 50 elements which are the names of the text files I wish to create. But the name of the file The code I have written is written below:
for($i=0;$i<$total_file_count;$i++)
{
$file="$array_file_names[$i].txt";
file_put_contents($file, "Testing....");
}
But the files that is created has the name $array_file_names[$i] and not the one that is contained in the array.