I want to know can I add a caption to this random script
<div style="background:transparent url(
backgrounds/<?php echo 'image-'.rand(0,20).'.jpg'; ?>);">
Welcome to my Site!
</div>
There’s another way it’s using an array for the caption:
$images = array(array("image 1" => "caption 1"),
array("image 2" => "caption 2"),
array("image 3" => "caption 3");
Can I add combine the two of them? Is it possible? If so, how do I do that?
If there’s no way. What else can I do? I appreciate any suggestion
Thanks
You could shuffle your
$imagesarray and grab the first index.