p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   drop down menu (http://p2p.wrox.com/showthread.php?t=12182)

junemo April 23rd, 2004 02:52 AM

drop down menu
i want create a menu bar (hav sub-menu item) at page header so i don't need repeat to write the code again to displays the menu at each page. So, how i want to do it with php language? Please give me some example and attach the soucre code to me.

Thanks a lot.

nikolai April 23rd, 2004 03:47 PM

Well, if your menu bar is plain HTML, you can save that HTML in a separate file (menu_bar.html might be a good name), and just include it in your PHP script:

echo "<html>....<body>";



However, you're really talking about page templates. A template is a basic layout for a page that specifies where everything goes, what colors, images, etc. belong on a page, but does NOT contain content.

There are many ways of using templates. I suggest starting with SMARTY to learn about PHP-driven templates.

Take care,


coitri May 7th, 2004 10:41 AM

Hi Nik,
Have you got the guiding document of SMARTY?
If yes, pls share it!
Thanks in advance!


All times are GMT -4. The time now is 07:34 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.