The image sizes are predetermined, but the order is not (hence random). Make sure your images are numbered (1 to infinity), not by name (a-z).
First Form:
[code]function randSidebar() {
$file = rand(x, y);//x is the min #, y is the max
$file .= '.ext';// change .ext to any extension, ie: .jpg, .gif
echo '<img src="' . $file . '">';
}
randSidebar(); //Call the function
[/code]
Using the original function, you can pass multiple sizes all over the page with this slight edit:
[code]function randSidebar($x,$y) {
$file = rand($x,$y);//x is the min #, y is the max
$file .= '.ext';// change .ext to any extension, ie: .jpg, .gif
echo '<img src="' . $file . '">';}
randSidebar(x-value,y-value); //Call the function, change x-value and y-value to whatever you want, ie: randSidebar(100,200)
[/code]
