Re: Outputting multiple images

From: Date: Thu, 07 Nov 2002 15:57:18 +0000
Subject: Re: Outputting multiple images
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123179@lists.php.net to get a copy of this message
I think the random number query will work but I have a problem with the context of the echo line. Here's how I get the image path. <? $root_path = "/www/special_projects/Elkhart"; $agent_url = "$root_path/$agent_name"; ?> <img src="<? echo $agent_url; ?>"> How would I use the rand function in the above statement? Ed > When you create the src tag in for the image, add a random number query > string - that will cause the browser to request the image instead of > using the cached version. I.e... > > echo '<img src="/images/image.jpg?'.rand(1000,9999).'">'; > > -- > Stuart >

« previous php.general (#123179) next »