View Single Post
11-21-2006, 07:33 AM
#15
Julian is offline Julian
Status: Simply to simplify
Join date: Apr 2005
Location: Foxton, Manawatu, New Zealand
Expertise:
Software:
 
Posts: 5,572
iTrader: 0 / 0%
 

Julian is on a distinguished road

  Old

This is the code I got for a rotator on my wordpress sites:

PHP Code:
<?php
// --------------------------------------------------
// This script has been developed by Salathe from Talkfreelance.com
// he built on the codes from Jonny and Garret.
// --------------------------------------------------

// Path to the images
$image_path 'http://www.imagefolder.com/imagefolder/';

// Array of images, they should be in the folder above ^^
$images = array (
    
'image-goes-here-01.jpg',
    
'image-goes-here-02.jpg',
    
'image-goes-here-03.jpg',
);

// Output HTML IMG code
printf(
    
'<img src="%s" alt="%s" />',
    
$image_path $images[rand(0, (count($images) - 1))],
    
'Coley Street School Header'
);  
?>