View Full Version : creating a long list
the-disturbed
10-22-2006, 08:59 PM
dunno if this can be done with pure HTML, i doubt it but this can be moved as neccesary, what im looking for is a way to dynamicaly create a list, that for example links to 400 mp3s or something crazy like that, i used a list generator then had to mess around with the code to get rid of the junk, but im changing the content of the list and don't wanna go through that again, what are my options???
You could do that with a php loop. Maybe have a loop that adds 1 to a variable every time. To do this you need to name the files like "file1.mp3", "file2.mp3", "file3.mp3", etc like this:
for($i=1; $i<401; $i++) {
echo '<a href="file' . $i . '.mp3">File ' . $i . '</a>';
}
But the problem with this is that the files would be named like "File 1" and "File 2" or "File One" and "File Two".
Well, i'm no expert...
NOTE: i don't think you can do that with HTML
djr33
10-22-2006, 11:22 PM
Can't do that in just html, unless you want to just type it out.
You can do it with php (good idea), using the above method, or getting it from a database, or some variation... whatever.
You could also do something similar with javascript, though php would be more compatible.
PHP is always better than JS, if possible to use it. There are a few reasons. If you need it to be live, or can't use php, then JS is the answer.
the-disturbed
10-23-2006, 01:19 AM
thx, thought i would need somethin like php or asp, problem with me is i know how to do things in concept but in code when it comes to asp and php (still learnin) lol, i gotta look it all up, but what i was thinkin is if there was a way to scan a folder and produce a list. while we're on the subject, whats a good package for php, mysql etc. i just reinstalled windows on my server (was an unregistered copy of xp media center, now its xp pro), im using IIS 5.1
tech_support
10-23-2006, 07:24 AM
I think that you could do it with JavaScript though...
the-disturbed
10-23-2006, 10:34 PM
nvm about creating the list i did it with a generator again, but the question remains, what should i get for PHP, Mysql, etc.?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.