cgchris99 Posted February 23, 2004 Posted February 23, 2004 I am working on a contribution and am fairly new to php. I have an array $sortby = array(1 => 'by Product name',2 => 'by Manufacturer'); How do I use the tep_draw_pull_down_menu to display a pull down for this sort order? I tried this but it doesn't give the desired results <?php echo 'Sort by ' . tep_draw_pull_down_menu('sortby', $sortby, '1', 'onChange="this.form.submit();"'); ?><input type="hidden" name="selected_box" value="reports"> Thanks for any information or help. Chris
♥ecartz Posted February 23, 2004 Posted February 23, 2004 define('TEXT_BY_PRODUCT_NAME', 'by Product Name'); define('TEXT_BY_MANUFACTURER', 'by Manufacturer'); $sortby = array(); $sortby[] = array('id' => '1', 'text' => TEXT_BY_PRODUCT_NAME); $sortby[] = array('id' => '2', 'text' => TEXT_BY_MANUFACTURER); This replaces your sortby assignment. The actual tep_draw_pull_down_menu call is correct. You should move the defines to the language files for compatibility. Hth, Matt Always back up before making changes.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.