Thanks for the contribution! I'm sure some of our customers will find this useful.
Here is a link to our KB article on how to create a custom File Format:
http://www.scootersoftware.com/suppo...rnalconversion
Announcement
Collapse
No announcement yet.
Simple PHP script to break lines
Collapse
X
-
Simple PHP script to break lines
Hi all,
I must compare two .js files that have the format below:
Code:var item = [ ['pagefile1.html', 'Page Name 1', 'keyword1, keyword2, keyword3, ...'], ['pagefile2.html', 'Page Name 2', 'keyword4, keyword5, keyword6, ...'], // etc. ];
Code:<?php // Very simple PHP script to convert commas to line breaks // Usage in BC3: C:\php5\bin\php.exe C:\php5\scripts\search.php %s %t $source = file($argv[1]); $target = array(); foreach($source as $line) { $line = str_replace(",", PHP_EOL, $line); // ... Additional processing goes here $target[] = $line; } file_put_contents($argv[2], $target); ?>
Hope this is useful to someone!Tags: None
Leave a comment: