On Sun, 3 Mar 2002, Jon Feldhammer wrote:

>I'm trying to create a single dynamic header for a wide range of web
>pages which I'll just include as I need it.  There are a few things that
>change per web page in the header, but I've settled all the issues
>except a good way of how to modify a single image that changes based on
>the web page being displayed.
>For example:
>I'm displaying index.php, which includes 'header.php', the variable
>$wpid indicates that the current web page is index.php.  Now index.php
>needs to display: (changing index_off.gif to index_on.gif)
>index_on.gif anotherpage_off.gif yetanotherpage_off.gif
>(the tricky part is that each image will change to on depending on what
>page is being displayed)
>I really haven't come up with an adequate solution.  Ideas?  Thanks.

I usually program dynamic image names when I encounter this.

$image = "banner";
        $image .= "_xmas";
$image .= ".gif";
<img src="<?=$image?>">

Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to