Posted The: 11/05/2008 At: 14:23
Last Edited: 06/05/2009 At: 4:08
Contents:
Before you read the Tutorial about Banner Rotation, it is recommended that you read Variables in PHP Which includes information about Array's, and finally String Concatenation.
Can also be used to rotate images
The first Example is really simple, and sufficient in most cases.
<?php $RandomNumber = rand(1, 10); echo '<img src="Images/' . $RandomNumber . 'img.jpg">'; ?>
The above asume that you already know the name of the images, simply name each image "1img.jpg, 2img.jpg, 3img.jpg" Etc. And then increase the random number accordingly.
The above also works on servers running php in Safe Mode, where the next dosn't. However the next has support for more filetypes, and dosn't require you to rename your images.
Writing in progress...
Comments: [0]
© Brugbart Webdesign