trim() will strip whitespace from both sides of a string
so if after triming, nothing is left, it will evaluate to boolean false, and it wont echo anything
<div id="list">
<ol>
<?php
$handle = fopen("playlist.txt", "r");
while (!feof($handle)) {
$buffer = fgets($handle);
$buffer = str_replace(".mp3", "", $buffer);
$buffer = stripslashes($buffer);
$buffer = trim($buffer);
if ($buffer) echo "<li>" . $buffer . "</li>";
}
fclose($handle);
?>
</ol>
<?php echo "Last Updated: " . date("F j, Y"); ?>
</div>
// btw - if you want to echo last update time of your file, do this. currently, your listing the current date
<?php echo "Last Updated: " . date("F j, Y", filemtime('playlist.txt')); ?>