In the code below, I simply replace all single quotes with double quotes from the original file.
I got most of it done, I just need to write it to a file now.
Should I store all the lines in memory and then write.
Or write line by line?
Which way is best
<?php
// http://stackoverflow.com/questions/5299471/php-parsing-a-txt-file
// http://stackoverflow.com/questions/15131619/create-carriage-return-in-php-string
// http://stackoverflow.com/questions/2424281/how-do-i-replace-double-quotes-with-single-quotes
$txt_file = file_get_contents('../js/a_file.js');
$rows = explode("\n", $txt_file);
array_shift($rows);
foreach($rows as $row => $data)
{
$data = str_replace("'", '"', $data);
// echo "" . $row . " | " . $data . "\r\n";
// fwrite($myfile, $txt);
}