Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-08-2013, 10:33 PM   PM User | #1
Jmarvig
New Coder

 
Join Date: Feb 2013
Location: Chaska, Minnesota
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Jmarvig is an unknown quantity at this point
PHP dropdown menu

How could I get this big chunk of html code into a PHP file ready to be inserted into a html document as a dropdown navigation menu?

Code:
<ul id="nav">

<li><a href="index.html">Home</a>
<li><a href="New Bridges.html ">New Bridges</a>
<li><a href="Cool Bridges.html ">Cool Bridges</a></li>
<li><a href="JMBPcontactpage.html ">Contact Me</a></li>
<li><a href="Mission.html ">About This Site</a></li>
<li><a href="Glossary.html ">Glossary</a></li>
<ul>
<li><a href="IL_COUNTIES ">Illinois Bridges</a>
<ul class="scrollable">
<li><a href="Jo Daviess County.html">Jo Daviess County</a></li>
</ul>
<li><a href="IA_COUNTIES ">Iowa Bridges</a>
<ul class="scrollable">
<li><a href="Dallas County.html">Dallas County</a></li>
<li><a href="Emmet County.html">Emmet County</a></li>
<li><a href="Floyd County.html">Floyd County</a></li>
<li><a href="Hamilton County.html">Hamilton County</a></li>
<li><a href="Polk County IA.html">Polk County</a></li>
<li><a href="Webster County.html">Webster County</a></li>
<li><a href="Wright County IA.html">Wright County</a></li>
</ul>
<li><a href="MN_COUNTIES ">Minnesota Bridges</a>
<ul class="scrollable">
<li><a href="Blue Earth County.html">Blue Earth County</a></li>
<li><a href="Brown County.html">Brown County</a></li>
<li><a href="Carver County.html">Carver County</a></li>
<li><a href="Chippewa County.html">Chippewa County</a></li>
<li><a href="Cottonwood  County.html">Cottonwood County</a></li>
<li><a href="Dakota County.html">Dakota County</a></li>
<li><a href="Grant County.html">Grant County</a></li>
<li><a href="Hennepin County.html">Hennepin County</a></li>
<li><a href="Jackson County.html">Jackson County</a></li>
<li><a href="Le Seuer County.html">Le Seuer County</a></li>
<li><a href="Lyon  County.html">Lyon County</a></li>
<li><a href="McLeod County.html">McLeod County</a></li>
<li><a href="Morrison County.html">Morrison County</a></li>
<li><a href="Nicollet County.html">Nicollet County</a></li>
<li><a href="Norman County.html">Norman County</a></li>
<li><a href="Otter Tail County.html">Otter Tail County</a></li>
<li><a href="Polk  County.html">Polk County</a></li>
<li><a href="Ramsey County.html">Ramsey County</a></li>
<li><a href="Redwood County.html">Redwood County</a></li>
<li><a href="Renville County.html">Renville County</a></li>
<li><a href="Rice County.html">Rice County</a></li>
<li><a href="Scott County.html">Scott County</a></li>
<li><a href="Stearns County.html">Stearns County</a></li>
<li><a href="Steele County.html">Steele County</a></li>
<li><a href="Wadena County.html">Wadena County</a></li>
<li><a href="Waseca County.html">Waseca County</a></li>
<li><a href="Washington County.html">Washington County</a></li>
<li><a href="Yellow Medicine County.html">Yellow Medicine County</a></li>
</ul>
<li><a href="Grand Forks.html ">North Dakota Bridges</a>
<ul class="scrollable">
<li><a href="Grand Forks.html">Grand Forks Area</a></li>
</ul>
<li><a href="WI_COUNTIES ">Wisconsin Bridges</a>
<ul class="scrollable">
<li><a href="Chippewa County WI.html">Chippewa County</a></li>
<li><a href="Dunn County.html">Dunn County</a></li>
<li><a href="Eau Claire County.html">Eau Claire County</a></li>
<li><a href="Polk County WI.html">Polk County</a></li>
</ul>
Thanks,
John
Jmarvig is offline   Reply With Quote
Old 02-08-2013, 11:12 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,645
Thanks: 4
Thanked 2,450 Times in 2,419 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Place in file of any sort, and include it into your PHP script. Done and done.
You don't need to do anything special with this since its just hard coded without any PHP. It could even be placed into a .txt file and included with include 'menu.txt';.

Although if this were I, I'd either put that data into a database or a file, and then use PHP to actually create the list items.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:14 AM.


Advertisement
Log in to turn off these ads.