So i'm trying to write this php script to output differences in text files. Here is my code so far:
<?php
header('Content-type: text/plain');
$file1 = "list2.txt";
$file2 = "list1.txt";
$lines1 = file($file1, FILE_IGNORE_NEW_LINES);
$lines2 = file($file2, FILE_IGNORE_NEW_LINES);
$result = array_diff($lines2, $lines1);
print_r($result);
?>
I want this to echo out just the leftover words without the [0] => on every line, i just want the word, not the numbering. I've tried using "pre" tags and it doesn't work.