Re: [PHP] header generation problem
Greg Donald wrote: > 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"; > if(isset($xmas_var)){ > $image .= "_xmas"; > } > $image .= ".gif"; > ?> > > Well this is a solution I thought of, but then aren't you stuck doing this for every image that can change? (like 20 of them in my case?) I didn't think there was a better way, I was just hoping there was. Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] header generation problem
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. -- --- 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
[PHP] header generation problem
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. Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php