hi, i just don't get this. i want a script to list the html/php files in a directory and apparently there are quite a few out there, but i keep running into some (probably) basic problems. i've gotten in the habit of counting those {}s. (i thought this was a dirty trick at first.) and beat the parse error, but know think my problem might be that the function isn't being called anywhere after the script. it just doesn't output anything. does that seem doepy?
here's the script. any feedback would be appreciated.
<?php
function navbar()
{
$files = dir(".");
$pipe = " | ";
while ($current = $files->read())
if (strpos($current, "html")!= FALSE)
{ if (strpos($current, "index") == FALSE)
{
print "<a href='";
print $current;
print "'>";
print $current;
print "</a>";
print $pipe;
};
};
}
?>