使用PHP从.INI文件构建数组[关闭]

I've my .ini file as follows

languages.ini
--------------------
fr = "French"
en = "English" 

Now, I'd like to read the file and keep the keys and values in the form of an array using PHP. I'm very new to PHP. I hope any one help me in achieving this. This is my following code.

     public function GetLanguages()
     {
         $langdir = ISC_BASE_PATH.'/language';
         $skip = Array (
            '.',
            '..',
            'CVS',
            '.svn',
         );
         $langs1 = array();
         $dh = opendir($langdir);
         while (($file = readdir($dh)) !== false) {


             if (!is_file($langdir.'/'.$file.'/languages.ini')) {
                 continue;
             }


             $langs1[] = $file;                 
          }
         echo "FileLL:".$file;
          foreach ($langs1 as $key) {
              echo "Store languagesss::".$key."<br>";
          }
          return $langs1;

     } 

Thank you in advance.

You are looking for PHP's ini parse function:

parse_ini_file

Just call $arrayResult = parse_ini_file($path_to_file)