0

How can i convert string from txt file to array?

Text.txt

"1" => "Text1",
"2" => "Text2",
"3" => "Text3",
"4" => "Text4",

index.php

$a = file_get_contents('Text.txt');
explode(',', $a); ???

I wanna see a pair of $key => $value. Is it possible?

0 Answers0