note 67131 rejected from function.scandir by bjori
| From: | bjori@php.net | Date: | Sat, 03 Jun 2006 18:44:13 +0000 |
| Subject: | note 67131 rejected from function.scandir by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-113143@lists.php.net to get a copy of this message | ||
Note Submitter: l_crazynemo_l at yahoo dot com
----
i really need a function for scandir to exclude the file extension
(".php",".txt",etc) and to make a href's
in other words lets say i have a directory called "x" and in it i have 3 files (a.php,
b.php, c.php)...
if i use the searchdir function it will give me this:
Array
(
[0] => .
[1] => ..
[2] => a.php
[3] => b.php
[4] => c.php
)
and i want to look like this (html code):
<a href=index.php?op=a>a</a><br>
<a href=index.php?op=b>b</a><br>
<a href=index.php?op=c>c</a><br>
a <- link to index.php?op=a
b <- link to index.php?op=b
c <- link to index.php?op=c
understand?
i'm kinda new at php, i started 1 month ago and i had no teacher :) thank you