pbolduc 0 Report post Posted December 26, 2007 I am in the process of writing a small content management system for my niche sites and need to be able to accomplish the following two items. Any assistance would be appreciated: I have a directory that has nothing but sub directories in it and I need to be able to identify each directory name and return them in an option drop down selection menu which will be included in an identifying URL. ALSO: I am in need of a script that could be included on a returned page that will read the content of a table and identify various keywords within the content and place a hyperlink around the particular keyword with the corresponding destination URL contained within.Any assistance in these areas would be greatly appreciated:Thanks in advance,pete Share this post Link to post Share on other sites
altimit 0 Report post Posted December 31, 2007 Hi pbolduc,PHP Directory and Filesystem Functions are your friends here. Have you considered looking at the PHP Manual for the relevant function already?In particular, the Directory Function "opendir" allows you to specify the directory you wish to access, and after which using "readdir" to get the filename of each suceeding entry, in a loop. In order for your script to know whether the returned entry by readdir is a file or a directory, you may use the Filesystem Function "is_dir", which returns a boolean true if the passed parameter corresponds to a directory entry.The PHP Manual entries for the functions I gave provide much sample code that will give you good insight on how to solve your problem; it should be very simple though as what you need is quite straightforward.Good luck. Share this post Link to post Share on other sites