eaglejazz Posted October 7, 2006 Share Posted October 7, 2006 I am still learning Php and therefore need your help!I want one php file that displays a different picture for 5-7 web pages. I was just wondering the code that i need to do this? Any help would be greatly appreciated!Dave Quote Link to comment https://forums.phpfreaks.com/topic/23315-just-need-one-more-step-for-website/ Share on other sites More sharing options...
desithugg Posted October 7, 2006 Share Posted October 7, 2006 umm you need to be more specific what exactly are you looking for Quote Link to comment https://forums.phpfreaks.com/topic/23315-just-need-one-more-step-for-website/#findComment-105709 Share on other sites More sharing options...
eaglejazz Posted October 7, 2006 Author Share Posted October 7, 2006 I need something like this...but this is for for the sublinks...and i want to have something like this for the images to be linked to different pages. For example, the first line the $display <li><img src="images/navigation.gif" /></li>'; shows this for all the pages but i want it images to be linked to a individual pages as I want it to.[code] case 'why.php': $display = '<ul id="why">'; $display .= '<li><img src="images/navigation.gif" /></li>'; $display .= '<li><a href="index.php?file=why.php">Why</a></li>'; $display .= '<li><a href="index.php?file=about.php">About Us</a></li>'; $display .= '<li><a href="index.php?file=where.php">Where</a></li>'; $display .= '</ul>'; echo $display; break; [/code]Dave Quote Link to comment https://forums.phpfreaks.com/topic/23315-just-need-one-more-step-for-website/#findComment-105710 Share on other sites More sharing options...
JasonLewis Posted October 8, 2006 Share Posted October 8, 2006 that still didnt really make sense to me... or its just that i didnt get enough sleep. i think your saying you want navigation.gif different for each file??? Quote Link to comment https://forums.phpfreaks.com/topic/23315-just-need-one-more-step-for-website/#findComment-105741 Share on other sites More sharing options...
wildteen88 Posted October 8, 2006 Share Posted October 8, 2006 If you want the image to be a link then wrap an anchor tag around it like you have done with the your text links:[code=php:0]$display .= '<li><a href="YOUR_URL_HERE"><img src="images/navigation.gif" border="0" /></a></li>';[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23315-just-need-one-more-step-for-website/#findComment-105818 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.