Reply to happy new year with a simpleton question...

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация