Skip to content

Instantly share code, notes, and snippets.

@evrekhman
Created September 16, 2018 10:38
Show Gist options
  • Save evrekhman/e3f7a02207306f3b139fc167a0a3a3ea to your computer and use it in GitHub Desktop.
Save evrekhman/e3f7a02207306f3b139fc167a0a3a3ea to your computer and use it in GitHub Desktop.
Binnary search
ключ1\tзначение1\x0Aключ2\tзначение2\
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?
$homepage = file_get_contents('bin.txt');
$str = mb_convert_encoding($homepage, "UTF-8", "ASCII");
$arrayName = array();
$arra = explode("\\x0A", $homepage);
foreach ($arra as $key => $value) {
$arra2 = explode("\\t", $value);
$res = array_merge($arrayName, $arra2);
}
print_r($res);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment