I have this code which I have tried as raw PHP and as Couch PHP wrapped code instead:
I want it to randomly display one image or the other.
Is there no way to do this without completely disabling caching for this page?
- Code: Select all
<?php
if (rand(0,100) > 50) {
echo "<img src='/images/image1.png' alt='Image 1'>"; }
else {
echo "<img src='/images/image2.png' alt='Image 2'>"; }
?>
I want it to randomly display one image or the other.
Is there no way to do this without completely disabling caching for this page?