Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Default Selection in an Array


Guest

Recommended Posts

Does anyone know how to have a drop down menu array select default setting? For instance in this one:

 

$year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));

 

the selections would be:

 

2004

2005

2006

2007

2008

2009

2010

2011

2012

2013

 

Is there any way to make is have (for example) 2006 as the default selection?

 

Brian

Link to comment
Share on other sites

If you use the tep_draw_pull_down_menu function, you can set the default value (passed in the third parameter.)

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...