I read file (answers.txt
) and write values into an array
$filename = 'answers.txt';
$file = file($filename);
How I can add keys to the array? answers.txt
looks like:
212
150
200
212
I need to get keys like:
$array = array (
"first" => "212",
"second" => "150",
"third" => "200",
"four" => "212"
);