Advertisement
metalx1000

PHP - GREP File

Jan 27th, 2012
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.13 KB | None | 0 0
  1. <?php
  2. $lines = file('list.txt');
  3. $lines = preg_grep("/test/", $lines);
  4. foreach ($lines as $line)
  5. {
  6. echo $line . "<br>";
  7. }
  8. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement