bobeye Posted February 24, 2012 Share Posted February 24, 2012 hi folks, need some help with this, iv got this code off a website, just the php part, iv put this code into a dynamic region of my site, as told to do, but when i then add it to a page style it doesnt show.now i know im probably missing a huge part of it but i dont even know what that is.and i still need to link eack option to a certain page of my site.any help i would be very grateful! <?phpfunction countrylist($action = 'dropdown', $selectedid = null) { $country_list = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan",...and so on.... ); if ($action == 'dropdown') { foreach ($country_list as $country) { echo "<option value=\"".$country."\""; if (!empty($selectedid)) { if ($selectedid == $country) { echo " selected=\"selected\""; } } echo ">".$country."</option>\n"; } } elseif ($action == 'list') { foreach ($country_list as $country) { echo "<li>".$country."</li>\n"; } }}?>if possible id like to be able to add a secondary option field to narrow that searh results that show up on a search page, the idea is for this to search specific event pages.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.