October 7, 201016 yr That's right, I want to load a random html file from a list into a another div. Does anyone knows any example, please? It would be very helpful. Thanks
October 8, 201016 yr after read it few times, i still not get what you want.. if you can explain better maybe i could help
October 8, 201016 yr PHP? Use a random number and then Include an external file based on the results of the random number.
October 8, 201016 yr Hi, I think perhaps a great job for jQuery? You could get a random number from the list on 'document ready' and then grab the content (html) and insert it in the div. Edit: Zed's is probably a simpler soultions actually... I suppose it depends on what exactly you want to do.
October 8, 201016 yr PHP? Use a random number and then Include an external file based on the results of the random number. ^this. Here's an example HTML Files to include... 1.html | 2.html | 3.html | 4.html | 5.html PHP... function incRandHTML($rangeMin, $rangeMax) { $rand = mt_rand(1, 5); $html = $rand . ".html"; include($html); }
Create an account or sign in to comment