Development Blog With Code Updates : Developercast.com

February 27, 2008

Tiffany Brown’s Blog: Turn text files into pull down menus

Filed under: Development — @ 10:35 am

Tiffany Brown shares a quick function she whipped up to create dropdown menus from the contents of a newline separated text file (or files).

I developed this PHP function for a project I’m working on. I’m posting it here in case I need it again, or in case you find it handy.

The function turns each line into an option tag making defining custom menus based on the contents of dynamically-given text files easy.

This could also be easily adapted to create navigations menus at the top of your pages with a few modifications to the HTML tags being used and some CSS to change the look of the list.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress