View difference between Paste ID: 0Q3ypavr and
SHOW: | | - or go back to the newest paste.
1-
1+
<?php
2
3
$filename = "fakexample.txt";
4
$file = fopen($filename, "rb");
5
$myFile = fread($file, filesize($filename));
6
$string = ":(";
7
8
function exclude_lines($exclude, $file){
9
  foreach(preg_split("/(\r?\n)/", $file) as $line){
10
    if(strpos($line,$exclude[0]) === false && strpos($line,$exclude[1]) === false)
11
      preg_match_all('/([^,]+)/', $line, $tokens);
12
13
$mytokes = var_dump($tokens);
14
echo $mytokes;
15
      
16
    
17
  }
18
  return $tokens;
19
}
20
21
22
exclude_lines($string, $myFile);
23
24
$output = exclude_lines($string, $myFile);
25
foreach($output as $output){
26
  echo $output;
27
}
28
29
?>