- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Can anyone help me out please.
Ive done something like these https://css-tricks.com/random-ad-positions/ examples on my site but i don’t know how to make the images into links ?
As you can tell i don’t know much about PHP :o
Thanks
Hi Rob….thanks for the quick reply….again :D
Ive gone for the second method so this is my code
<?php
$totalImages = 3;
$all = range(1,$totalImages);
shuffle($all);
foreach ($all as $single) {
echo "<img src=’//link/ad-$single.jpg’ alt=’ad’ /> ";
}
?>
So do you know how i would apply it to this method ?
Thanks again
well you just need to wrap your echo’ed <img> tag in an anchor tag. Do you know where it is linking? is each link separate? Where are you getting the link from?
Yeh each link will be separate. At the moment there is just 3 links/images, two will go to 2 different domains and one wil link to a page on my site.