PHP Option Select Menu Generator Function - Dropdown Menu

/ Published in: PHP
Save to your folder(s)

I wrote this little bit of code myself so if you see where you can improve on it, let me know. This is great for making complex menu's and also for making sure your POST data gets saved and reselected when the screen refreshes. I use it in all my programs now, makes menu generation a snap.

In order to use this you need to make sure you set at minimum
$menu_vars as an array of values and $menu_postvalue as a string to the be the name of the POST field. By default, if no $menu_values is set, $menu_vars will be set both to be the display and value.

Example Usage in the Snippet

I look forward to your feedback.


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.