Using PHP, how can I add quotations to a non-standard INI file?
I'm having to work with a custom application that stores information in an INI formatted file. Unfortunately, it doesn't use double-quotes around all the values, so PHP's parse_ini_file function won't work. Is there some way to add quotations around ALL the values in the INI file so that the parse_ini_file would be able to parse it?
I figured out something that works for me! $lines = file_get_contents('bravo.txt'); $search = array("=", "\r\n"); $replace = array("=\"", "\" ");
Try this: $content = preg_replace('^([^=]+)=\s*(.*)$', '$1="$2"", $fileContent); This should make sure you are not falsely including whitespaces in your values.
get profile picture url from Windows live
SugarCRM: Hierarchy Using 'Reports to' Field?
Distinguish users Codeigniter
PHP - List pulled from one field exploding commas
how we can count items by id in database using laravel
Display All Followed Users In Laravel
PHP with MS sql server
Select all from MySql and join other
How to call an artisan console command with an interaction
How to implement Abstract class in laravel 5
PHP: Convert epoch to MySQL DateTime format
How to check if JSON object exists
Opencart: need help for checkout extension
php - Parse.com change createdAt Column timezone
Laravel 5 sending email via mandrill errors
How to get AppController beforeFilter data in Model?