How to create a key-value array from a text file in PHP? -


I am trying to create a dictionary for a multilingual web site. I have a text file with some data in the KEY = "VALUE" format.

  STACKOVERFLOW = "stackoverflow" ASKING_A_QUESTION = "ask a question" ...  

me at the left hand of the character = To get the right words as the key and the same value of the same value.

My result should be

  $ result to return ['STACKOVERFLOW']; // stackoverflow  

You can use:

 < Code>; File: [seconds_section] path = "/ usr / local / bin" URL = "http://www.example.com/~username"  

code

  // paras $ ini_array = parse_ini_file ("sample.ini") without squares; Print_r ($ ini_array);  

output

  array ([path] => / usr / local / bin [URL] => http: // www. Example com / ~ username)  

Comments