Jump to content

displaying folders in a folder


darkcarnival

Recommended Posts

I just got into arrays, you can set variables into an array and have each one be able to be called with a number, you could write a small program to have the program cycle through the arrays, like a loop function or something.

[a href=\"http://www.hudzilla.org/phpbook/read.php/5_2_0\" target=\"_blank\"]http://www.hudzilla.org/phpbook/read.php/5_2_0[/a]
this and the tutorial before and after this.
Link to comment
Share on other sites

what i mean is, hers aan example:

.folder1
..sub-folder1
...sub-folder2
....sub-folder3
now the sub folders iwant to be categories in the gallery script, but how do i replacre those dots to be an actual folder name that will be of use for me.

cause just calling to view a folder will just display the dots which doesnt do me any good.
Link to comment
Share on other sites

I tried, but I can't figure anything out, sorry someone named dark carnival is reading this so he will probably answer in just a minute.

that was embarrasing you are dark carnival
Give me just a second to check something maybe I can help.

well let me ask you something. WHat exactly do you mean, did you want the folders to have different names, or do somethign with the php to rename the variables.
Link to comment
Share on other sites

yes. I have one idea.
Set each folder as a variable. Then have the value of the variable to be the url of the folder.
for instance

dog = "http://www.mysite.com/category1";
and so on
and then maybe when you call the variable it might create a link to the url
if that works then try creating an entire array, and set the array to have keys.
a
b
c
d
in place of abcd have it the name of the category, so the key is the category name, then have the values set to the specific urls of the folder. And then from there you can do whatever you want to with the array. That is if urls can be passed to variables.

i would test it out for you, but I just had my web host shut down my server, to switch it from php 4 to php5. So that is going to take the rest of my work night, adn I Won't have access, or else I would try it out and come up with something for you. I am 90% you can pass a url as a string variable, either way it's just text.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.