Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = file_get_contents("foo.txt");
- preg_match_all("/^(.*) (http.*)\s*$/m", $str, $matches);
- print_r($matches);
- echo("<!doctype html><html><head><title>stuff</title></head><body>\n");
- echo("<ul>\n");
- for($i=0;$i<count($matches[0]);$i++){
- echo("<li><a href=\"".$matches[2][$i]."\">".$matches[1][$i]."</a></li>\n");
- }
- echo("</ul>\n");
- echo("</body></html>\n");
Add Comment
Please, Sign In to add comment