Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $filename = "fakexample.txt";
- $file = fopen($filename, "rb");
- $myFile = fread($file, filesize($filename));
- $string = ":(";
- function exclude_lines($exclude, $file){
- foreach(preg_split("/(\r?\n)/", $file) as $line){
- if(strpos($line,$exclude[0]) === false && strpos($line,$exclude[1]) === false)
- preg_match_all('/([^,]+)/', $line, $tokens);
- $mytokes = var_dump($tokens);
- echo $mytokes;
- }
- return $tokens;
- }
- exclude_lines($string, $myFile);
- $output = exclude_lines($string, $myFile);
- foreach($output as $output){
- echo $output;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement