howard-moore Posted December 7, 2009 Share Posted December 7, 2009 Hi Everyone, I am nearly there with a script but have hit something of a stumbling block. I have the following bit of code which when called brings up a list of links to directories located elsewhere on the server. The idea is to create a system of automatically adding links to a textarea to a dynamically created list of directories for people who are not very good at html coding: <?php // If there are directory if(!empty($jmnp_directories)) { foreach($jmnp_directories as $key => $value) { $directory_name = $value['name']; $directory_size = format_size($value['size']); $directory_date = date('jS F Y', $value['date']); echo "<option value=\"".url($directories_before_current_path.$current_directory_path.$directory_name,'dir')."&by=date&order=asc\">$directory_name</option>\n"; } } ?> What I need help with now is a way to include more than just the parth to the directory in the OPTION VALUE. I need to include <a href="[i]PATH TO DIRECTORY[/i]">$directory_name</a> in the OPTION VALUE, but I cannot work out how this is done. Any help really gratefully received! Neil Quote Link to comment https://forums.phpfreaks.com/topic/184257-including-html-links-in-form-drop-lists/ Share on other sites More sharing options...
JustLikeIcarus Posted December 7, 2009 Share Posted December 7, 2009 Your best option may be to delimit the necessary items in the options value like directories|path|name then parse that into a url when its submitted. Quote Link to comment https://forums.phpfreaks.com/topic/184257-including-html-links-in-form-drop-lists/#findComment-972801 Share on other sites More sharing options...
howard-moore Posted December 7, 2009 Author Share Posted December 7, 2009 I don't think that's an option I'm afraid. It is a system that automatically shows sub-folders in a top-level directory (i.e. file / folder browser). Quote Link to comment https://forums.phpfreaks.com/topic/184257-including-html-links-in-form-drop-lists/#findComment-972812 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.