I'm using the following code to pull the definition of a word from a tab-delimited file with only two columns (word, definition). Is this the most efficient code for what I'm trying to do?

```
<?php
$haystack  = file("dictionary.txt");
$needle = 'apple';

$flipped_haystack = array_flip($haystack);

foreach($haystack as $value)
    {
    $haystack = explode("\t", $value);

    if ($haystack[0] == $needle)
        {
        echo "Definition of $needle: $haystack[1]";
        $defined = "1";
        break;
        }
    }

if($defined != "1")
    {
    echo "$needle not found!";
    }
?>

```