PHP code example of duncan3dc / bom-string
1. Go to this page and download the library: Download duncan3dc/bom-string library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
duncan3dc / bom-string example snippets
use duncan3dc\Bom\Util;
$string = Util::removeBom($bomString);
use duncan3dc\Bom\StreamFilter;
stream_filter_register("bom-filter", StreamFilter::class);
$file = fopen($filename, "r");
stream_filter_append($file, "bom-filter");
while ($row = fgetcsv($file)) {
print_r($row);
}
fclose($file);