0
I want to show all the sub-folder inside the a particular folder in html
Eg "main" is the parent folder and inside this there are 10 sub-folder i want to show the folder name in list inside html
5 Réponses
+ 3
What about using <details> tag? Sadly, there is no information about it on Sololearn, but here is a reference: https://www.w3schools.com/tags/tag_details.asp .
Example of how you can use it (not exactly 10 folders, so that you will not just copy-paste the code): https://code.sololearn.com/WyHjK6ny5Osr/?ref=app .
+ 1
actually i want to include all the folder name inside parent folder through php
Like if i create one more folder inside parent folder then the folder name should be shown on the page
0
Deepak Kanojiya, oh, sorry then. I did not read the tags.
I do not know PHP, but I think of two tips:
1. If you want folders to be shown in the screen then the interface is similar. You just need to add a button to add/remove a folder or something else with a script that edits the main folder's tag's HTML, which is pretty simple to do in JavaScript, but impossible to do in PHP directly. That may help: https://stackoverflow.com/questions/7547908/use-php-to-change-a-html-elements-inner-text (maybe, you should also use AJAX and JavaScript for that, as for some answers).
2. If you also need your PHP code to have a copy of folders, you can use array. That may help you: https://stackoverflow.com/questions/6490482/are-there-dictionaries-in-php .
Hope my try to help you is successful.