The problem is with your quotes. Use double quotes to allow PHP to interpret your variables.
If you change the line to:
$result = exec("grep $mp3 $searchdata");
it should work.
However... another way you might want to handle this, is to use PHP functionality, rather than making a system call. This way you're not forking another process.
try this:
<?php
$searchdata = file("/usr/local/www/data/mp3search/files");
for ($i = 0; $i < sizeof($searchdata); $i++) {
if (eregi($mp3,$searchdata[$i]))
$results[count($results)] = $searchdata[$i];
}
?>
Then all the matching results would be in the $results array.