|
Posted by windandwaves on 01/01/06 11:51
Hi Folk
Happy New Year!
I am trying to make my page a bit more interesting by adding "random"
pictures (7 in total).
I use the following line:
$v = (str_replace('<h2>', '<div class="imgholder"><img
src="i/t'.floor(rand(1,7)).'.jpg" alt="test" /></div><h2>', $v));
where $v is the content of my page. Before every <h2> it adds a pucture.
However, it is the same picture all the way through the page. How can I get
to a random picture (without replacement if possible)?
Thanks in advance
Nicolaas
Navigation:
[Reply to this message]
|